Repository navigation
deno.unstable Configuration Not Functioning as Expected #26223
Description
Version: Deno 2.0.2
The configuration schema indicates that deno.unstable is a valid option that accepts an array of strings.

I have added it to my denols configuration in my lspconfig.lua as follows:
denols = {
root_dir = lspconfig.util.root_pattern("package.json", "deno.json", "deno.jsonc"),
-- single_file_support = false,
flags = {
debounce_text_changes = 150,
},
filetypes = {
"javascript",
"javascript.jsx",
"javascriptreact",
"typescript",
"typescript.tsx",
"typescriptreact",
"markdown",
},
settings = {
javascript = {
inlayHints = {
parameterNames = { enabled = "none", suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = false },
variableTypes = { enabled = false, suppressWhenTypeMatchesName = true },
propertyDeclarationTypes = { enabled = false },
functionLikeReturnTypes = { enabled = false },
enumMemberValues = { enabled = false },
},
},
typescript = {
inlayHints = {
parameterNames = { enabled = "none", suppressWhenArgumentMatchesName = true },
parameterTypes = { enabled = false },
variableTypes = { enabled = false, suppressWhenTypeMatchesName = true },
propertyDeclarationTypes = { enabled = false },
functionLikeReturnTypes = { enabled = false },
enumMemberValues = { enabled = false },
},
},
deno = {
enable = true,
lint = true,
-- config = './deno.jsonc',
-- disabledPaths = []
-- unstable = { "sloppy-imports" },
suggest = {
names = true,
paths = true,
completeFunctionCalls = false,
autoImports = true,
imports = {
autoDiscover = true,
hosts = {
["https://deno.land"] = true,
},
},
},
},
},
},Despite this configuration, the sloppy-imports option does not take effect unless I include a deno.json file with the following content: { "unstable": ["sloppy-imports"] } in the root of my project.
This requirement is problematic for me since I use denols as the language server for all my TypeScript files, including those outside of Deno projects. Adding a deno.json file to non-Deno projects feels out of place.
Request
Could you either enable sloppy-imports by default or fix the issue where the configuration doesn’t pick it up? This change would greatly improve the usability of denols across various projects.
Activity