mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 08:39:50 +01:00
feat: make svelte lsp install optional
This commit is contained in:
parent
232d93024c
commit
0e66f6282b
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,11 @@ with builtins; let
|
|||
lspconfig.svelte.setup {
|
||||
capabilities = capabilities;
|
||||
on_attach = attach_keymaps,
|
||||
cmd = { "${cfg.lsp.package}/bin/svelteserver", "--stdio" }
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then nvim.lua.expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/svelteserver", "--stdio"}''
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
@ -74,7 +78,7 @@ in {
|
|||
|
||||
package = mkOption {
|
||||
description = "Svelte 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