aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBahex <Bahex@users.noreply.github.com>2025-05-23 17:17:10 +0300
committerGitHub <noreply@github.com>2025-05-23 07:17:10 -0700
commit8d798d5b92057b67c159872625b1f9474335c801 (patch)
tree438fec13dcd2db4d1e5777bc0b6c7e3977be855f
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.tar
nvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.tar.gz
nvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.tar.bz2
nvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.tar.lz
nvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.tar.xz
nvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.tar.zst
nvim-lspconfig-8d798d5b92057b67c159872625b1f9474335c801.zip
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.
-rw-r--r--lsp/nushell.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lsp/nushell.lua b/lsp/nushell.lua
index 14d2dc15..b7f72f47 100644
--- a/lsp/nushell.lua
+++ b/lsp/nushell.lua
@@ -6,5 +6,7 @@
return {
cmd = { 'nu', '--lsp' },
filetypes = { 'nu' },
- root_markers = { '.git' },
+ root_dir = function(bufnr, on_dir)
+ on_dir(vim.fs.root(bufnr, { '.git' }) or vim.fs.dirname(vim.api.nvim_buf_get_name(bufnr)))
+ end,
}