mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
Allow `test.warnings` and `test.assertions` to be defined as either a list, or a function coerced to a list. When defined as a function, it is supplied an `expect` function which provides some syntactic-sugar for defining simple expectations. This is an alternative to the current approach of defining that `expect` function on an ad-hoc basis. I prefer this to adding `expect` to nixvim's lib because: 1. That would require having access to `lib` 2. IDK where in `lib` such a specialized function should live
93 lines
1.8 KiB
Nix
93 lines
1.8 KiB
Nix
let
|
|
# This plugin is deprecated
|
|
warnings = expect: [
|
|
(expect "count" 1)
|
|
(expect "any" "The `rust-tools` project has been abandoned.")
|
|
];
|
|
in
|
|
{
|
|
empty = {
|
|
test = { inherit warnings; };
|
|
plugins.rust-tools.enable = true;
|
|
};
|
|
|
|
defaults = {
|
|
test = { inherit warnings; };
|
|
plugins.rust-tools = {
|
|
enable = true;
|
|
executor = "termopen";
|
|
onInitialized = null;
|
|
reloadWorkspaceFromCargoToml = true;
|
|
inlayHints = {
|
|
auto = true;
|
|
onlyCurrentLine = false;
|
|
showParameterHints = true;
|
|
parameterHintsPrefix = "<- ";
|
|
otherHintsPrefix = "=> ";
|
|
maxLenAlign = false;
|
|
maxLenAlignPadding = 1;
|
|
rightAlign = false;
|
|
rightAlignPadding = 7;
|
|
highlight = "Comment";
|
|
};
|
|
hoverActions = {
|
|
border = [
|
|
[
|
|
"╭"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"─"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"╮"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"│"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"╯"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"─"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"╰"
|
|
"FloatBorder"
|
|
]
|
|
[
|
|
"│"
|
|
"FloatBorder"
|
|
]
|
|
];
|
|
maxWidth = null;
|
|
maxHeight = null;
|
|
autoFocus = false;
|
|
};
|
|
crateGraph = {
|
|
backend = "x11";
|
|
output = null;
|
|
full = true;
|
|
enabledGraphvizBackends = null;
|
|
};
|
|
server = {
|
|
standalone = true;
|
|
};
|
|
};
|
|
};
|
|
|
|
rust-analyzer-options = {
|
|
test = { inherit warnings; };
|
|
plugins.rust-tools = {
|
|
enable = true;
|
|
server = {
|
|
assist.expressionFillDefault = "default";
|
|
};
|
|
};
|
|
};
|
|
}
|