From 6743bd280c869208625cd01bb581eca5820d0d4a Mon Sep 17 00:00:00 2001 From: Soliprem Date: Fri, 27 Sep 2024 18:18:54 +0200 Subject: [PATCH] haskell: LSP cmd definition --- modules/plugins/languages/haskell.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/plugins/languages/haskell.nix b/modules/plugins/languages/haskell.nix index d2440f3f..52db7d2b 100644 --- a/modules/plugins/languages/haskell.nix +++ b/modules/plugins/languages/haskell.nix @@ -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", "}'' + }, } ''; })