remove function files_in_immediate_folder

This commit is contained in:
sfja 2025-09-09 20:37:04 +02:00
parent 6f115db7cb
commit f1104536ef

View File

@ -391,28 +391,6 @@ require("lazy").setup({
local util = require("lspconfig.util")
local function files_in_immediate_folder(patterns)
return function(start_path)
start_path = util.strip_archive_subpath(start_path)
for _, pattern in ipairs(patterns) do
for _, p in
ipairs(
vim.fn.glob(
util.path.join(util.path.escape_wildcards(start_path), pattern),
true,
true
)
)
do
if util.path.exists(p) then
return start_path
end
end
end
return nil
end
end
-- Enable the following language servers
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
--
@ -451,12 +429,10 @@ require("lazy").setup({
},
},
denols = {
-- root_dir = files_in_immediate_folder({ "deno.jsonc", "deno.json" }),
root_dir = util.root_pattern("deno.jsonc", "deno.json"),
single_file_support = false,
},
-- ts_ls = {
-- root_dir = files_in_immediate_folder({ "package.json" }),
-- single_file_support = false,
-- },
}