mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 12:09:48 +01:00
feat: make typescript lsp install optional
This commit is contained in:
parent
a0399722a0
commit
13c3026362
1 changed files with 11 additions and 3 deletions
|
@ -16,7 +16,11 @@ with builtins; let
|
||||||
lspconfig.tsserver.setup {
|
lspconfig.tsserver.setup {
|
||||||
capabilities = capabilities;
|
capabilities = capabilities;
|
||||||
on_attach = attach_keymaps,
|
on_attach = attach_keymaps,
|
||||||
cmd = { "${cfg.lsp.package}/bin/typescript-language-server", "--stdio" }
|
cmd = ${
|
||||||
|
if isList cfg.lsp.package
|
||||||
|
then nvim.lua.expToLua cfg.lsp.package
|
||||||
|
else ''{"${cfg.lsp.package}/bin/typescript-language-server", "--stdio"}''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -27,7 +31,11 @@ with builtins; let
|
||||||
lspconfig.denols.setup {
|
lspconfig.denols.setup {
|
||||||
capabilities = capabilities;
|
capabilities = capabilities;
|
||||||
on_attach = attach_keymaps,
|
on_attach = attach_keymaps,
|
||||||
cmd = { "${cfg.lsp.package}/bin/deno", "lsp" }
|
cmd = ${
|
||||||
|
if isList cfg.lsp.package
|
||||||
|
then nvim.lua.expToLua cfg.lsp.package
|
||||||
|
else ''{"${cfg.lsp.package}/bin/deno", "lsp"}''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -96,7 +104,7 @@ in {
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "Typescript/Javascript LSP server package";
|
description = "Typescript/Javascript LSP server package";
|
||||||
type = types.package;
|
type = with types; either package (listOf str);
|
||||||
default = servers.${cfg.lsp.server}.package;
|
default = servers.${cfg.lsp.server}.package;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue