Skip to content

Commit c8de780

Browse files
committed
fix(rooter): add LSP client root_dir to roots
1 parent 3b60036 commit c8de780

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lua/astrocore/rooter.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ function M.detectors.lsp(config)
4646
-- TODO: remove when dropping support for Neovim v0.9
4747
for _, client in ipairs((vim.lsp.get_clients or vim.lsp.get_active_clients) { buffer = bufnr }) do
4848
if not server_filter or not server_filter(client) then
49+
if client.root_dir then table.insert(roots, client.root_dir) end
4950
vim.tbl_map(
5051
function(ws) table.insert(roots, vim.uri_to_fname(ws.uri)) end,
5152
client.config.workspace_folders or {}

0 commit comments

Comments
 (0)