diff options
| author | Bahex <Bahex@users.noreply.github.com> | 2025-05-23 17:17:10 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-23 07:17:10 -0700 |
| commit | 8d798d5b92057b67c159872625b1f9474335c801 (patch) | |
| tree | 438fec13dcd2db4d1e5777bc0b6c7e3977be855f | |
| parent | docs: update configs.md (diff) | |
| download | nvim-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.lua | 4 |
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, } |
