remove function files_in_immediate_folder
This commit is contained in:
parent
6f115db7cb
commit
f1104536ef
24
init.lua
24
init.lua
@ -391,28 +391,6 @@ require("lazy").setup({
|
|||||||
|
|
||||||
local util = require("lspconfig.util")
|
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
|
-- Enable the following language servers
|
||||||
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
-- Feel free to add/remove any LSPs that you want here. They will automatically be installed.
|
||||||
--
|
--
|
||||||
@ -451,12 +429,10 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
denols = {
|
denols = {
|
||||||
-- root_dir = files_in_immediate_folder({ "deno.jsonc", "deno.json" }),
|
|
||||||
root_dir = util.root_pattern("deno.jsonc", "deno.json"),
|
root_dir = util.root_pattern("deno.jsonc", "deno.json"),
|
||||||
single_file_support = false,
|
single_file_support = false,
|
||||||
},
|
},
|
||||||
-- ts_ls = {
|
-- ts_ls = {
|
||||||
-- root_dir = files_in_immediate_folder({ "package.json" }),
|
|
||||||
-- single_file_support = false,
|
-- single_file_support = false,
|
||||||
-- },
|
-- },
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user