nvim: Switch to static-ls for Haskell LSP

This commit is contained in:
Sanchayan Maity 2024-10-29 22:37:33 +05:30
parent d9b0614587
commit 18502cbb50
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -204,27 +204,15 @@ function M.gopls_config()
end
function M.hls_config()
local root_files = { 'hie.yaml', 'stack.yaml', 'cabal.project', '*.cabal', 'package.yaml' }
local root_files = { '*.cabal', 'cabal.project', 'hie.yaml', 'package.yaml', 'stack.yaml' }
local root_directory = get_root_directory(root_files)
return {
name = "hls",
cmd = { 'haskell-language-server-wrapper', '--lsp' },
capabilities = default_capabilities,
root_dir = root_directory,
filetypes = { 'cabal', 'haskell' },
single_file_support = true,
settings = {
haskell = {
checkParents = 'CheckOnSave',
checkProject = false,
cabalFormattingProvider = 'cabalfmt',
formattingProvider = 'ormolu',
maxCompletions = 20,
plugin = { stan = { globalOn = false } },
sessionLoading = 'multipleComponents'
}
},
name = "static-ls",
cmd = { 'static-ls' },
capabilities = default_capabilities,
root_dir = root_directory,
filetypes = { 'haskell' },
}
end