devos/users/modules/neovim/rust.nix

20 lines
389 B
Nix
Raw Normal View History

{ lib, pkgs, config, ... }:
let
2022-08-17 22:02:19 +02:00
cfg = config.mae.nvim;
in
with lib;
{
2022-08-17 22:02:19 +02:00
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" }
}
'';
};
};
}