mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide: Reformat with nixfmt
This commit is contained in:
parent
c6281260dc
commit
62f32bfc71
459 changed files with 28139 additions and 26377 deletions
|
@ -4,9 +4,11 @@
|
|||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
with lib;
|
||||
let
|
||||
cfg = config.plugins.lsp.servers.rust-analyzer;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.plugins.lsp.servers.rust-analyzer = {
|
||||
# https://github.com/nix-community/nixvim/issues/674
|
||||
installCargo = mkOption {
|
||||
|
@ -37,45 +39,30 @@ in {
|
|||
};
|
||||
config = mkIf cfg.enable {
|
||||
warnings =
|
||||
(
|
||||
optional
|
||||
(cfg.installCargo == null)
|
||||
''
|
||||
`rust_analyzer` relies on `cargo`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installCargo = true` to install it automatically
|
||||
with Nixvim.
|
||||
You can customize which package to install by changing
|
||||
`plugins.lsp.servers.rust-analyzer.cargoPackage`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installCargo = false` to not have it install
|
||||
through Nixvim.
|
||||
By doing so, you will dismiss this warning.
|
||||
''
|
||||
)
|
||||
++ (
|
||||
optional
|
||||
(cfg.installRustc == null)
|
||||
''
|
||||
`rust_analyzer` relies on `rustc`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installRustc = true` to install it automatically
|
||||
with Nixvim.
|
||||
You can customize which package to install by changing
|
||||
`plugins.lsp.servers.rust-analyzer.rustcPackage`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installRustc = false` to not have it install
|
||||
through Nixvim.
|
||||
By doing so, you will dismiss this warning.
|
||||
''
|
||||
);
|
||||
(optional (cfg.installCargo == null) ''
|
||||
`rust_analyzer` relies on `cargo`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installCargo = true` to install it automatically
|
||||
with Nixvim.
|
||||
You can customize which package to install by changing
|
||||
`plugins.lsp.servers.rust-analyzer.cargoPackage`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installCargo = false` to not have it install
|
||||
through Nixvim.
|
||||
By doing so, you will dismiss this warning.
|
||||
'')
|
||||
++ (optional (cfg.installRustc == null) ''
|
||||
`rust_analyzer` relies on `rustc`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installRustc = true` to install it automatically
|
||||
with Nixvim.
|
||||
You can customize which package to install by changing
|
||||
`plugins.lsp.servers.rust-analyzer.rustcPackage`.
|
||||
- Set `plugins.lsp.servers.rust-analyzer.installRustc = false` to not have it install
|
||||
through Nixvim.
|
||||
By doing so, you will dismiss this warning.
|
||||
'');
|
||||
|
||||
extraPackages = with pkgs;
|
||||
(
|
||||
optional
|
||||
((isBool cfg.installCargo) && cfg.installCargo)
|
||||
cfg.cargoPackage
|
||||
)
|
||||
++ (
|
||||
optional
|
||||
((isBool cfg.installRustc) && cfg.installRustc)
|
||||
cfg.rustcPackage
|
||||
);
|
||||
extraPackages =
|
||||
with pkgs;
|
||||
(optional ((isBool cfg.installCargo) && cfg.installCargo) cfg.cargoPackage)
|
||||
++ (optional ((isBool cfg.installRustc) && cfg.installRustc) cfg.rustcPackage);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue