Skip to content

Commit 8d798d5

Browse files
authored
fix(nushell): avoid nil root_dir #3861
From #3611 : > nushell 0.102 made some changes that a nil root_dir will cause lsp server to exit.
1 parent f610208 commit 8d798d5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lsp/nushell.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,7 @@
66
return {
77
cmd = { 'nu', '--lsp' },
88
filetypes = { 'nu' },
9-
root_markers = { '.git' },
9+
root_dir = function(bufnr, on_dir)
10+
on_dir(vim.fs.root(bufnr, { '.git' }) or vim.fs.dirname(vim.api.nvim_buf_get_name(bufnr)))
11+
end,
1012
}

0 commit comments

Comments
 (0)