From 9ecbb5a3e7157e3c2e010ce1309f6592113a6a06 Mon Sep 17 00:00:00 2001 From: Emilio Ziniades Date: Sun, 19 Nov 2023 10:13:16 +0200 Subject: fix(hls): update root_dir --- lua/lspconfig/server_configurations/hls.lua | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'lua/lspconfig/server_configurations/hls.lua') 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")]], }, }, } -- cgit v1.2.3-70-g09d2