aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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")]],
},
},
}