mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 05:19:48 +01:00
feat: make sql lsp install optional
This commit is contained in:
parent
54f52bec2b
commit
35e86d1f12
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue