2022-06-29 00:02:00 +02:00
|
|
|
{ lib, pkgs, config, ... }:
|
|
|
|
let
|
2022-08-17 22:02:19 +02:00
|
|
|
cfg = config.mae.nvim;
|
2022-06-29 00:02:00 +02:00
|
|
|
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 = ''
|
|
|
|
{
|
2022-08-20 00:04:16 +02:00
|
|
|
cmd = { "${pkgs.rust-analyzer}/bin/rust-analyzer" },
|
|
|
|
settings = {
|
|
|
|
["rust-analyzer"] = { cargo = { features = "all" } }
|
|
|
|
}
|
2022-08-17 22:02:19 +02:00
|
|
|
}
|
|
|
|
'';
|
2022-06-29 00:02:00 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|