mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
feat: make python lsp install optional
This commit is contained in:
parent
13c3026362
commit
54f52bec2b
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,11 @@ with builtins; let
|
|||
lspconfig.pyright.setup{
|
||||
capabilities = capabilities;
|
||||
on_attach = default_on_attach;
|
||||
cmd = {"${cfg.lsp.package}/bin/pyright-langserver", "--stdio"}
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then nvim.lua.expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/pyright-langserver", "--stdio"}''
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
@ -123,7 +127,7 @@ in {
|
|||
|
||||
package = mkOption {
|
||||
description = "python LSP server package";
|
||||
type = types.package;
|
||||
type = with types; either package (listOf string);
|
||||
default = servers.${cfg.lsp.server}.package;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue