diff --git a/modules/languages/sql.nix b/modules/languages/sql.nix index 4093ec9..0f1a4e9 100644 --- a/modules/languages/sql.nix +++ b/modules/languages/sql.nix @@ -20,7 +20,11 @@ with builtins; let on_attach_keymaps(client, bufnr) require'sqls'.setup{} end, - cmd = { "${cfg.lsp.package}/bin/sqls", "-config", string.format("%s/config.yml", vim.fn.getcwd()) } + cmd = ${ + if isList cfg.lsp.package + then nvim.lua.expToLua cfg.lsp.package + else ''{ "${cfg.lsp.package}/bin/sqls", "-config", string.format("%s/config.yml", vim.fn.getcwd()) }'' + } } ''; }; @@ -88,7 +92,7 @@ in { package = mkOption { description = "SQL LSP server package"; - type = types.package; + type = with types; either package (listOf str); default = servers.${cfg.lsp.server}.package; }; };