mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 03:26:17 +00:00
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib, config, ... }:
|
|
let
|
|
cfg = config.presets.languages.rust;
|
|
in
|
|
{
|
|
options.presets.languages.rust = {
|
|
enable = lib.mkEnableOption "Rust";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
plugins = {
|
|
conform-nvim.settings.formattters_by_ft.rust = [ "rustfmt" ];
|
|
lsp.servers.rust_analyzer = {
|
|
enable = true;
|
|
installCargo = false;
|
|
installRustc = false;
|
|
settings.inlayHints = {
|
|
bindingModeHints.enable = false;
|
|
chainingHints.enable = true;
|
|
closingBraceHints = {
|
|
enable = true;
|
|
minLines = 25;
|
|
};
|
|
closureReturnTypeHints.enable = "never";
|
|
lifetimeElisionHints = {
|
|
enable = "never";
|
|
useParameterNames = false;
|
|
};
|
|
maxLength = 25;
|
|
parameterHints.enable = true;
|
|
reborrowHints.enable = "never";
|
|
renderColons = true;
|
|
typeHints = {
|
|
enable = true;
|
|
hideClosureInitialization = false;
|
|
hideNamedConstructor = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|