nvim: lsp-utils: Use new vim.fs.root function for getting root directory

38b9c322c9
This commit is contained in:
Sanchayan Maity 2024-04-25 11:57:19 +05:30
parent 41f25229dc
commit cb46c82d53
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -65,9 +65,7 @@ end
-- End of deno specific functions -- End of deno specific functions
local get_root_directory = function(root_files) local get_root_directory = function(root_files)
local path = vim.fs.find(root_files, { type = "file" }) return vim.fs.root(0, root_files)
return vim.fs.dirname(path[1])
end end
local default_capabilities = vim.lsp.protocol.make_client_capabilities() local default_capabilities = vim.lsp.protocol.make_client_capabilities()