From efb1bf9215f580aed77d4d6a62da450eb5ed0881 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Sat, 19 Jul 2025 04:30:50 -0400 Subject: [PATCH] AutoYADM commit: 2025-07-19 04:30:50 --- .config/kak/autoload/lsp.kak | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index 2e81eb58..7da0f9b7 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -83,7 +83,7 @@ define-command -hidden -override lsp-hide-code-actions %{ set-option global lsp_debug false # list of filetypes for which LSP will be activated in the window scope -declare-option str-list lsp_filetypes python go rust bash fish c cpp typst markdown yaml json jsonc bash sh typescript javascript latex toml bibtex +declare-option str-list lsp_filetypes python go rust bash fish c cpp typst markdown yaml json jsonc bash sh typescript javascript latex toml bibtex haskell declare-option -hidden bool inlay_enabled false @@ -375,4 +375,28 @@ hook -group lsp-filetype-sh global BufSetOption filetype=sh %{ } } +hook -group lsp-filetype-haskell global BufSetOption filetype=haskell %{ + set-option buffer lsp_servers %{ + [haskell-language-server] + root_globs = ["hie.yaml", "cabal.project", "Setup.hs", "stack.yaml", "*.cabal"] + command = "haskell-language-server-wrapper" + args = ["--lsp"] + settings_section = "_" + [haskell-language-server.settings._] + # See https://haskell-language-server.readthedocs.io/en/latest/configuration.html + # haskell.formattingProvider = "ormolu" + } + # There now exists also static-ls, which uses less memory, is faster and suited + # even for big Haskell code bases. But it needs more configuration. + # https://github.com/josephsumabat/static-ls + # See https://github.com/josephsumabat/static-ls?tab=readme-ov-file#quick-start + # and https://github.com/josephsumabat/static-ls/blob/main/docs/advanced-setup.md + # set-option buffer lsp_servers %{ + # [static-ls] + # root_globs = ["*.cabal", "stack.yaml", "cabal.project", "package.yaml", "hie.yaml", "Setup.hs"] + # command = "static-ls" + # } +} + + ∴