mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 11:01:15 +00:00
feat: make rust lsp install optional
This commit is contained in:
parent
3907c61f9b
commit
3ca97bccbc
1 changed files with 6 additions and 2 deletions
|
@ -30,7 +30,7 @@ in {
|
|||
|
||||
package = mkOption {
|
||||
description = "rust-analyzer package";
|
||||
type = types.package;
|
||||
type = with types; either package (listOf str);
|
||||
default = pkgs.rust-analyzer;
|
||||
};
|
||||
|
||||
|
@ -118,7 +118,11 @@ in {
|
|||
server = {
|
||||
capabilities = capabilities,
|
||||
on_attach = rust_on_attach,
|
||||
cmd = {"${cfg.lsp.package}/bin/rust-analyzer"},
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then nvim.lua.expToLua cfg.lsp.package
|
||||
else ''{"${cfg.lsp.package}/bin/rust-analyzer"}''
|
||||
},
|
||||
settings = {
|
||||
${cfg.lsp.opts}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue