22 lines
490 B
Nix
22 lines
490 B
Nix
{ lib, pkgs, config, ... }:
|
|
let
|
|
cfg = config.mae.nvim;
|
|
in
|
|
with lib;
|
|
{
|
|
options.mae.nvim.rust.enable = lib.mkEnableOption "Enable rust language support in neovim";
|
|
|
|
config = mkIf cfg.rust.enable {
|
|
mae.nvim.lsp.servers.rust_analyzer = {
|
|
enable = true;
|
|
script = ''
|
|
{
|
|
cmd = { "${pkgs.rust-analyzer}/bin/rust-analyzer" },
|
|
settings = {
|
|
["rust-analyzer"] = { cargo = { features = "all" } }
|
|
}
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|