diff options
| -rw-r--r-- | lsp/fish_lsp.lua | 3 | ||||
| -rw-r--r-- | lua/lspconfig/configs/fish_lsp.lua | 6 |
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, }, |
