haskell: LSP cmd definition

This commit is contained in:
Soliprem 2024-09-27 18:18:54 +02:00
parent 1e3d8e19b0
commit 6743bd280c

View file

@ -6,6 +6,8 @@
}: let }: let
inherit (lib.options) mkEnableOption mkOption; inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge; inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.nvim.lua) expToLua;
inherit (lib.types) package; inherit (lib.types) package;
inherit (lib.nvim.types) mkGrammarOption; inherit (lib.nvim.types) mkGrammarOption;
@ -41,7 +43,11 @@ in {
lspconfig.haskell_ls.setup { lspconfig.haskell_ls.setup {
capabilities = capabilities, capabilities = capabilities,
on_attach=default_on_attach, on_attach=default_on_attach,
cmd = "${cfg.lsp.package}/bin/haskell-language-server", cmd = ${
if isList cfg.lsp.package
then expToLua cfg.lsp.package
else ''{" "${cfg.lsp.package}/bin/haskell-language-server", "}''
},
} }
''; '';
}) })