aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lsp/fish_lsp.lua3
-rw-r--r--lua/lspconfig/configs/fish_lsp.lua6
2 files changed, 5 insertions, 4 deletions
diff --git a/lsp/fish_lsp.lua b/lsp/fish_lsp.lua
index d368c55c..73055cad 100644
--- a/lsp/fish_lsp.lua
+++ b/lsp/fish_lsp.lua
@@ -10,7 +10,6 @@
--- [homepage](https://www.fish-lsp.dev/)
return {
cmd = { 'fish-lsp', 'start' },
- cmd_env = { fish_lsp_show_client_popups = false },
filetypes = { 'fish' },
- root_markers = { '.git' },
+ root_markers = { 'config.fish', '.git' },
}
diff --git a/lua/lspconfig/configs/fish_lsp.lua b/lua/lspconfig/configs/fish_lsp.lua
index 8339163e..ad206897 100644
--- a/lua/lspconfig/configs/fish_lsp.lua
+++ b/lua/lspconfig/configs/fish_lsp.lua
@@ -1,10 +1,12 @@
+local util = require 'lspconfig.util'
+
return {
default_config = {
cmd = { 'fish-lsp', 'start' },
- cmd_env = { fish_lsp_show_client_popups = false },
filetypes = { 'fish' },
root_dir = function(fname)
- return vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
+ return util.root_pattern('config.fish')(fname)
+ or vim.fs.dirname(vim.fs.find('.git', { path = fname, upward = true })[1])
end,
single_file_support = true,
},