mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-30 00:26:45 +00:00
feat: make go lsp install optional
This commit is contained in:
parent
2f0efdbf15
commit
3907c61f9b
1 changed files with 6 additions and 2 deletions
|
@ -16,7 +16,11 @@ with builtins; let
|
||||||
lspconfig.gopls.setup {
|
lspconfig.gopls.setup {
|
||||||
capabilities = capabilities;
|
capabilities = capabilities;
|
||||||
on_attach = default_on_attach;
|
on_attach = default_on_attach;
|
||||||
cmd = {"${cfg.lsp.package}/bin/gopls", "serve"},
|
cmd = ${
|
||||||
|
if isList cfg.lsp.package
|
||||||
|
then nvim.lua.expToLua cfg.lsp.package
|
||||||
|
else ''{"${cfg.lsp.package}/bin/gopls", "serve"}''
|
||||||
|
},
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
@ -82,7 +86,7 @@ in {
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "Go LSP server package";
|
description = "Go 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