haskell: LSP cmd definition

This commit is contained in:
Soliprem 2024-09-27 18:18:54 +02:00
parent 1ece52ed42
commit f6fb1ba498

View file

@ -6,6 +6,8 @@
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.lists) isList;
inherit (lib.nvim.lua) expToLua;
inherit (lib.types) package;
inherit (lib.nvim.types) mkGrammarOption;
@ -41,7 +43,11 @@ in {
lspconfig.haskell_ls.setup {
capabilities = capabilities,
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", "}''
},
}
'';
})