aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/server_configurations/hls.lua
diff options
context:
space:
mode:
authorEmilio Ziniades <emilioziniades@protonmail.com>2023-11-19 10:13:16 +0200
committerEmilio Ziniades <emilioziniades@protonmail.com>2023-11-19 10:37:52 +0200
commit9ecbb5a3e7157e3c2e010ce1309f6592113a6a06 (patch)
treefc8d281df642f7b2f4cc5dd643ed46f4eb80f139 /lua/lspconfig/server_configurations/hls.lua
parentfix(gradle_ls): update root_dir (diff)
downloadnvim-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.lua16
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")]],
},
},
}