diff options
| author | Emilio Ziniades <emilioziniades@protonmail.com> | 2023-11-19 10:13:16 +0200 |
|---|---|---|
| committer | Emilio Ziniades <emilioziniades@protonmail.com> | 2023-11-19 10:37:52 +0200 |
| commit | 9ecbb5a3e7157e3c2e010ce1309f6592113a6a06 (patch) | |
| tree | fc8d281df642f7b2f4cc5dd643ed46f4eb80f139 /lua/lspconfig/server_configurations/hls.lua | |
| parent | fix(gradle_ls): update root_dir (diff) | |
| download | nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.tar nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.tar.gz nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.tar.bz2 nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.tar.lz nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.tar.xz nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.tar.zst nvim-lspconfig-9ecbb5a3e7157e3c2e010ce1309f6592113a6a06.zip | |
fix(hls): update root_dir
Diffstat (limited to 'lua/lspconfig/server_configurations/hls.lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/hls.lua | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lua/lspconfig/server_configurations/hls.lua b/lua/lspconfig/server_configurations/hls.lua index e0d0e702..4390440d 100644 --- a/lua/lspconfig/server_configurations/hls.lua +++ b/lua/lspconfig/server_configurations/hls.lua @@ -4,12 +4,7 @@ return { default_config = { cmd = { 'haskell-language-server-wrapper', '--lsp' }, filetypes = { 'haskell', 'lhaskell' }, - root_dir = function(filepath) - return ( - util.root_pattern('hie.yaml', 'stack.yaml', 'cabal.project')(filepath) - or util.root_pattern('*.cabal', 'package.yaml')(filepath) - ) - end, + root_dir = util.root_pattern('hie.yaml', 'stack.yaml', 'cabal.project', '*.cabal', 'package.yaml'), single_file_support = true, settings = { haskell = { @@ -51,14 +46,7 @@ require('lspconfig')['hls'].setup{ ]], default_config = { - root_dir = [[ -function (filepath) - return ( - util.root_pattern('hie.yaml', 'stack.yaml', 'cabal.project')(filepath) - or util.root_pattern('*.cabal', 'package.yaml')(filepath) - ) -end - ]], + root_dir = [[root_pattern("hie.yaml", "stack.yaml", "cabal.project", "*.cabal", "package.yaml")]], }, }, } |
