mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +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 {
|
package = mkOption {
|
||||||
description = "rust-analyzer package";
|
description = "rust-analyzer package";
|
||||||
type = types.package;
|
type = with types; either package (listOf str);
|
||||||
default = pkgs.rust-analyzer;
|
default = pkgs.rust-analyzer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,7 +118,11 @@ in {
|
||||||
server = {
|
server = {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = rust_on_attach,
|
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 = {
|
settings = {
|
||||||
${cfg.lsp.opts}
|
${cfg.lsp.opts}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue