nix-community.nixvim/plugins/nvim-lsp/rust-analyzer-config.nix
2023-02-20 10:42:13 +00:00

1561 lines
39 KiB
Nix

# THIS FILE IS AUTOGENERATED DO NOT EDIT
lib:
with lib; {
"assist" = {
"expressionFillDefault" = mkOption {
type = types.nullOr (types.enum ["todo" "default"]);
default = null;
description = ''
Placeholder expression to use for missing expressions in assists.
default value is:
```nix
"todo"
```
'';
};
};
"cachePriming" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Warm up caches on project load.
default value is:
```nix
true
```
'';
};
"numThreads" = mkOption {
type = types.nullOr (types.numbers.between 0 255);
default = null;
description = ''
How many worker threads to handle priming caches. The default `0` means to pick automatically.
default value is:
```nix
0
```
'';
};
};
"cargo" = {
"autoreload" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Automatically refresh project info via `cargo metadata` on
`Cargo.toml` or `.cargo/config.toml` changes.
default value is:
```nix
true
```
'';
};
"buildScripts" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Run build scripts (`build.rs`) for more precise code analysis.
default value is:
```nix
true
```
'';
};
"overrideCommand" = mkOption {
type = types.nullOr (types.nullOr (types.listOf (types.str)));
default = null;
description = ''
Override the command rust-analyzer uses to run build scripts and
build procedural macros. The command is required to output json
and should therefore include `--message-format=json` or a similar
option.
By default, a cargo invocation will be constructed for the configured
targets and features, with the following base command line:
```bash
cargo check --quiet --workspace --message-format=json --all-targets
```
.
default value is:
```nix
null
```
'';
};
"useRustcWrapper" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use `RUSTC_WRAPPER=rust-analyzer` when running build scripts to
avoid checking unnecessary things.
default value is:
```nix
true
```
'';
};
};
"features" = mkOption {
type = types.nullOr (types.oneOf [(types.enum ["all"]) (types.listOf (types.str))]);
default = null;
description = ''
List of features to activate.
Set this to `"all"` to pass `--all-features` to cargo.
default value is:
```nix
[]
```
'';
};
"noDefaultFeatures" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to pass `--no-default-features` to cargo.
default value is:
```nix
false
```
'';
};
"noSysroot" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Internal config for debugging, disables loading of sysroot crates.
default value is:
```nix
false
```
'';
};
"target" = mkOption {
type = types.nullOr (types.nullOr (types.str));
default = null;
description = ''
Compilation target override (target triple).
default value is:
```nix
null
```
'';
};
"unsetTest" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
Unsets `#[cfg(test)]` for the specified crates.
default value is:
```nix
["core"]
```
'';
};
};
"checkOnSave" = {
"allTargets" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Check all targets and tests (`--all-targets`).
default value is:
```nix
true
```
'';
};
"command" = mkOption {
type = types.nullOr (types.str);
default = null;
description = ''
Cargo command to use for `cargo check`.
default value is:
```nix
"check"
```
'';
};
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Run specified `cargo check` command for diagnostics on save.
default value is:
```nix
true
```
'';
};
"extraArgs" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
Extra arguments for `cargo check`.
default value is:
```nix
[]
```
'';
};
"features" = mkOption {
type = types.nullOr (types.nullOr (types.oneOf [(types.enum ["all"]) (types.listOf (types.str))]));
default = null;
description = ''
List of features to activate. Defaults to
`#rust-analyzer.cargo.features#`.
Set to `"all"` to pass `--all-features` to Cargo.
default value is:
```nix
null
```
'';
};
"noDefaultFeatures" = mkOption {
type = types.nullOr (types.nullOr (types.bool));
default = null;
description = ''
Whether to pass `--no-default-features` to Cargo. Defaults to
`#rust-analyzer.cargo.noDefaultFeatures#`.
default value is:
```nix
null
```
'';
};
"overrideCommand" = mkOption {
type = types.nullOr (types.nullOr (types.listOf (types.str)));
default = null;
description = ''
Override the command rust-analyzer uses instead of `cargo check` for
diagnostics on save. The command is required to output json and
should therefor include `--message-format=json` or a similar option.
If you're changing this because you're using some tool wrapping
Cargo, you might also want to change
`#rust-analyzer.cargo.buildScripts.overrideCommand#`.
If there are multiple linked projects, this command is invoked for
each of them, with the working directory being the project root
(i.e., the folder containing the `Cargo.toml`).
An example command would be:
```bash
cargo check --workspace --message-format=json --all-targets
```
.
default value is:
```nix
null
```
'';
};
"target" = mkOption {
type = types.nullOr (types.nullOr (types.str));
default = null;
description = ''
Check for a specific target. Defaults to
`#rust-analyzer.cargo.target#`.
default value is:
```nix
null
```
'';
};
};
"completion" = {
"autoimport" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Toggles the additional completions that automatically add imports when completed.
Note that your client must specify the `additionalTextEdits` LSP client capability to truly have this feature enabled.
default value is:
```nix
true
```
'';
};
};
"autoself" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Toggles the additional completions that automatically show method calls and field accesses
with `self` prefixed to them when inside a method.
default value is:
```nix
true
```
'';
};
};
"callable" = {
"snippets" = mkOption {
type = types.nullOr (types.enum ["fill_arguments" "add_parentheses" "none"]);
default = null;
description = ''
Whether to add parenthesis and argument snippets when completing function.
default value is:
```nix
"fill_arguments"
```
'';
};
};
"postfix" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show postfix snippets like `dbg`, `if`, `not`, etc.
default value is:
```nix
true
```
'';
};
};
"privateEditable" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enables completions of private items and fields that are defined in the current workspace even if they are not visible at the current position.
default value is:
```nix
false
```
'';
};
};
"snippets" = {
"custom" = mkOption {
type = types.nullOr (types.attrsOf types.anything);
default = null;
description = ''
Custom completion snippets.
default value is:
```nix
{"Arc::new" = {"postfix" = "arc";
"body" = "Arc::new($\{receiver})";
"requires" = "std::sync::Arc";
"description" = "Put the expression into an `Arc`";
"scope" = "expr";
};
"Rc::new" = {"postfix" = "rc";
"body" = "Rc::new($\{receiver})";
"requires" = "std::rc::Rc";
"description" = "Put the expression into an `Rc`";
"scope" = "expr";
};
"Box::pin" = {"postfix" = "pinbox";
"body" = "Box::pin($\{receiver})";
"requires" = "std::boxed::Box";
"description" = "Put the expression into a pinned `Box`";
"scope" = "expr";
};
"Ok" = {"postfix" = "ok";
"body" = "Ok($\{receiver})";
"description" = "Wrap the expression in a `Result::Ok`";
"scope" = "expr";
};
"Err" = {"postfix" = "err";
"body" = "Err($\{receiver})";
"description" = "Wrap the expression in a `Result::Err`";
"scope" = "expr";
};
"Some" = {"postfix" = "some";
"body" = "Some($\{receiver})";
"description" = "Wrap the expression in an `Option::Some`";
"scope" = "expr";
};
}
```
'';
};
};
};
"diagnostics" = {
"disabled" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
List of rust-analyzer diagnostics to disable.
default value is:
```nix
[]
```
'';
};
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show native rust-analyzer diagnostics.
default value is:
```nix
true
```
'';
};
"experimental" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show experimental rust-analyzer diagnostics that might
have more false positives than usual.
default value is:
```nix
false
```
'';
};
};
"remapPrefix" = mkOption {
type = types.nullOr (types.attrsOf types.anything);
default = null;
description = ''
Map of prefixes to be substituted when parsing diagnostic file paths.
This should be the reverse mapping of what is passed to `rustc` as `--remap-path-prefix`.
default value is:
```nix
{}
```
'';
};
"warningsAsHint" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
List of warnings that should be displayed with hint severity.
The warnings will be indicated by faded text or three dots in code
and will not show up in the `Problems Panel`.
default value is:
```nix
[]
```
'';
};
"warningsAsInfo" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
List of warnings that should be displayed with info severity.
The warnings will be indicated by a blue squiggly underline in code
and a blue icon in the `Problems Panel`.
default value is:
```nix
[]
```
'';
};
};
"files" = {
"excludeDirs" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
These directories will be ignored by rust-analyzer. They are
relative to the workspace root, and globs are not supported. You may
also need to add the folders to Code's `files.watcherExclude`.
default value is:
```nix
[]
```
'';
};
"watcher" = mkOption {
type = types.nullOr (types.enum ["client" "server"]);
default = null;
description = ''
Controls file watching implementation.
default value is:
```nix
"client"
```
'';
};
};
"highlightRelated" = {
"breakPoints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enables highlighting of related references while the cursor is on `break`, `loop`, `while`, or `for` keywords.
default value is:
```nix
true
```
'';
};
};
"exitPoints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enables highlighting of all exit points while the cursor is on any `return`, `?`, `fn`, or return type arrow (`->`).
default value is:
```nix
true
```
'';
};
};
"references" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enables highlighting of related references while the cursor is on any identifier.
default value is:
```nix
true
```
'';
};
};
"yieldPoints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enables highlighting of all break points for a loop or block context while the cursor is on any `async` or `await` keywords.
default value is:
```nix
true
```
'';
};
};
};
"hover" = {
"actions" = {
"debug" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Debug` action. Only applies when
`#rust-analyzer.hover.actions.enable#` is set.
default value is:
```nix
true
```
'';
};
};
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show HoverActions in Rust files.
default value is:
```nix
true
```
'';
};
"gotoTypeDef" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Go to Type Definition` action. Only applies when
`#rust-analyzer.hover.actions.enable#` is set.
default value is:
```nix
true
```
'';
};
};
"implementations" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Implementations` action. Only applies when
`#rust-analyzer.hover.actions.enable#` is set.
default value is:
```nix
true
```
'';
};
};
"references" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `References` action. Only applies when
`#rust-analyzer.hover.actions.enable#` is set.
default value is:
```nix
false
```
'';
};
};
"run" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Run` action. Only applies when
`#rust-analyzer.hover.actions.enable#` is set.
default value is:
```nix
true
```
'';
};
};
};
"documentation" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show documentation on hover.
default value is:
```nix
true
```
'';
};
"keywords" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show keyword hover popups. Only applies when
`#rust-analyzer.hover.documentation.enable#` is set.
default value is:
```nix
true
```
'';
};
};
};
"links" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use markdown syntax for links in hover.
default value is:
```nix
true
```
'';
};
};
};
"imports" = {
"granularity" = {
"enforce" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to enforce the import granularity setting for all files. If set to false rust-analyzer will try to keep import styles consistent per file.
default value is:
```nix
false
```
'';
};
"group" = mkOption {
type = types.nullOr (types.enum ["preserve" "crate" "module" "item"]);
default = null;
description = ''
How imports should be grouped into use statements.
default value is:
```nix
"crate"
```
'';
};
};
"group" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Group inserted imports by the [following order](https://rust-analyzer.github.io/manual.html#auto-import). Groups are separated by newlines.
default value is:
```nix
true
```
'';
};
};
"merge" = {
"glob" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to allow import insertion to merge new imports into single path glob imports like `use std::fmt::*;`.
default value is:
```nix
true
```
'';
};
};
"prefix" = mkOption {
type = types.nullOr (types.enum ["plain" "self" "crate"]);
default = null;
description = ''
The path structure for newly inserted paths to use.
default value is:
```nix
"plain"
```
'';
};
};
"inlayHints" = {
"bindingModeHints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show inlay type hints for binding modes.
default value is:
```nix
false
```
'';
};
};
"chainingHints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show inlay type hints for method chains.
default value is:
```nix
true
```
'';
};
};
"closingBraceHints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show inlay hints after a closing `}` to indicate what item it belongs to.
default value is:
```nix
true
```
'';
};
"minLines" = mkOption {
type = types.nullOr (types.addCheck types.int (x: x >= 0));
default = null;
description = ''
Minimum number of lines required before the `}` until the hint is shown (set to 0 or 1
to always show them).
default value is:
```nix
25
```
'';
};
};
"closureReturnTypeHints" = {
"enable" = mkOption {
type = types.nullOr (types.enum ["always" "never" "with_block"]);
default = null;
description = ''
Whether to show inlay type hints for return types of closures.
default value is:
```nix
"never"
```
'';
};
};
"lifetimeElisionHints" = {
"enable" = mkOption {
type = types.nullOr (types.enum ["always" "never" "skip_trivial"]);
default = null;
description = ''
Whether to show inlay type hints for elided lifetimes in function signatures.
default value is:
```nix
"never"
```
'';
};
"useParameterNames" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to prefer using parameter names as the name for elided lifetime hints if possible.
default value is:
```nix
false
```
'';
};
};
"maxLength" = mkOption {
type = types.nullOr (types.nullOr (types.addCheck types.int (x: x >= 0)));
default = null;
description = ''
Maximum length for inlay hints. Set to null to have an unlimited length.
default value is:
```nix
25
```
'';
};
"parameterHints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show function parameter name inlay hints at the call
site.
default value is:
```nix
true
```
'';
};
};
"reborrowHints" = {
"enable" = mkOption {
type = types.nullOr (types.enum ["always" "never" "mutable"]);
default = null;
description = ''
Whether to show inlay type hints for compiler inserted reborrows.
default value is:
```nix
"never"
```
'';
};
};
"renderColons" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to render leading colons for type hints, and trailing colons for parameter hints.
default value is:
```nix
true
```
'';
};
"typeHints" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show inlay type hints for variables.
default value is:
```nix
true
```
'';
};
"hideClosureInitialization" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to hide inlay type hints for `let` statements that initialize to a closure.
Only applies to closures with blocks, same as `#rust-analyzer.inlayHints.closureReturnTypeHints.enable#`.
default value is:
```nix
false
```
'';
};
"hideNamedConstructor" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to hide inlay type hints for constructors.
default value is:
```nix
false
```
'';
};
};
};
"joinLines" = {
"joinAssignments" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Join lines merges consecutive declaration and initialization of an assignment.
default value is:
```nix
true
```
'';
};
"joinElseIf" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Join lines inserts else between consecutive ifs.
default value is:
```nix
true
```
'';
};
"removeTrailingComma" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Join lines removes trailing commas.
default value is:
```nix
true
```
'';
};
"unwrapTrivialBlock" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Join lines unwraps trivial blocks.
default value is:
```nix
true
```
'';
};
};
"lens" = {
"debug" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Debug` lens. Only applies when
`#rust-analyzer.lens.enable#` is set.
default value is:
```nix
true
```
'';
};
};
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show CodeLens in Rust files.
default value is:
```nix
true
```
'';
};
"forceCustomCommands" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Internal config: use custom client-side commands even when the
client doesn't set the corresponding capability.
default value is:
```nix
true
```
'';
};
"implementations" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Implementations` lens. Only applies when
`#rust-analyzer.lens.enable#` is set.
default value is:
```nix
true
```
'';
};
};
"references" = {
"adt" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `References` lens for Struct, Enum, and Union.
Only applies when `#rust-analyzer.lens.enable#` is set.
default value is:
```nix
false
```
'';
};
};
"enumVariant" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `References` lens for Enum Variants.
Only applies when `#rust-analyzer.lens.enable#` is set.
default value is:
```nix
false
```
'';
};
};
"method" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Method References` lens. Only applies when
`#rust-analyzer.lens.enable#` is set.
default value is:
```nix
false
```
'';
};
};
"trait" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `References` lens for Trait.
Only applies when `#rust-analyzer.lens.enable#` is set.
default value is:
```nix
false
```
'';
};
};
};
"run" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `Run` lens. Only applies when
`#rust-analyzer.lens.enable#` is set.
default value is:
```nix
true
```
'';
};
};
};
"linkedProjects" = mkOption {
type = types.nullOr (types.listOf (types.oneOf [(types.str) (types.attrsOf types.anything)]));
default = null;
description = ''
Disable project auto-discovery in favor of explicitly specified set
of projects.
Elements must be paths pointing to `Cargo.toml`,
`rust-project.json`, or JSON objects in `rust-project.json` format.
default value is:
```nix
[]
```
'';
};
"lru" = {
"capacity" = mkOption {
type = types.nullOr (types.nullOr (types.addCheck types.int (x: x >= 0)));
default = null;
description = ''
Number of syntax trees rust-analyzer keeps in memory. Defaults to 128.
default value is:
```nix
null
```
'';
};
};
"notifications" = {
"cargoTomlNotFound" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to show `can't find Cargo.toml` error message.
default value is:
```nix
true
```
'';
};
};
"procMacro" = {
"attributes" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Expand attribute macros. Requires `#rust-analyzer.procMacro.enable#` to be set.
default value is:
```nix
true
```
'';
};
};
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enable support for procedural macros, implies `#rust-analyzer.cargo.buildScripts.enable#`.
default value is:
```nix
true
```
'';
};
"ignored" = mkOption {
type = types.nullOr (types.attrsOf types.anything);
default = null;
description = ''
These proc-macros will be ignored when trying to expand them.
This config takes a map of crate names with the exported proc-macro names to ignore as values.
default value is:
```nix
{}
```
'';
};
"server" = mkOption {
type = types.nullOr (types.nullOr (types.str));
default = null;
description = ''
Internal config, path to proc-macro server executable (typically,
this is rust-analyzer itself, but we override this in tests).
default value is:
```nix
null
```
'';
};
};
"runnables" = {
"command" = mkOption {
type = types.nullOr (types.nullOr (types.str));
default = null;
description = ''
Command to be executed instead of 'cargo' for runnables.
default value is:
```nix
null
```
'';
};
"extraArgs" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
Additional arguments to be passed to cargo for runnables such as
tests or binaries. For example, it may be `--release`.
default value is:
```nix
[]
```
'';
};
};
"rustc" = {
"source" = mkOption {
type = types.nullOr (types.nullOr (types.str));
default = null;
description = ''
Path to the Cargo.toml of the rust compiler workspace, for usage in rustc_private
projects, or "discover" to try to automatically find it if the `rustc-dev` component
is installed.
Any project which uses rust-analyzer with the rustcPrivate
crates must set `[package.metadata.rust-analyzer] rustc_private=true` to use it.
This option does not take effect until rust-analyzer is restarted.
default value is:
```nix
null
```
'';
};
};
"rustfmt" = {
"extraArgs" = mkOption {
type = types.nullOr (types.listOf (types.str));
default = null;
description = ''
Additional arguments to `rustfmt`.
default value is:
```nix
[]
```
'';
};
"overrideCommand" = mkOption {
type = types.nullOr (types.nullOr (types.listOf (types.str)));
default = null;
description = ''
Advanced option, fully override the command rust-analyzer uses for
formatting.
default value is:
```nix
null
```
'';
};
"rangeFormatting" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Enables the use of rustfmt's unstable range formatting command for the
`textDocument/rangeFormatting` request. The rustfmt option is unstable and only
available on a nightly build.
default value is:
```nix
false
```
'';
};
};
};
"semanticHighlighting" = {
"doc" = {
"comment" = {
"inject" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Inject additional highlighting into doc comments.
When enabled, rust-analyzer will highlight rust source in doc comments as well as intra
doc links.
default value is:
```nix
true
```
'';
};
};
};
};
"operator" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use semantic tokens for operators.
When disabled, rust-analyzer will emit semantic tokens only for operator tokens when
they are tagged with modifiers.
default value is:
```nix
true
```
'';
};
"specialization" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use specialized semantic tokens for operators.
When enabled, rust-analyzer will emit special token types for operator tokens instead
of the generic `operator` token type.
default value is:
```nix
false
```
'';
};
};
};
"punctuation" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use semantic tokens for punctuations.
When disabled, rust-analyzer will emit semantic tokens only for punctuation tokens when
they are tagged with modifiers or have a special role.
default value is:
```nix
false
```
'';
};
"separate" = {
"macro" = {
"bang" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
When enabled, rust-analyzer will emit a punctuation semantic token for the `!` of macro
calls.
default value is:
```nix
false
```
'';
};
};
};
"specialization" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use specialized semantic tokens for punctuations.
When enabled, rust-analyzer will emit special token types for punctuation tokens instead
of the generic `punctuation` token type.
default value is:
```nix
false
```
'';
};
};
};
"strings" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Use semantic tokens for strings.
In some editors (e.g. vscode) semantic tokens override other highlighting grammars.
By disabling semantic tokens for strings, other grammars can be used to highlight
their contents.
default value is:
```nix
true
```
'';
};
};
};
"signatureInfo" = {
"detail" = mkOption {
type = types.nullOr (types.enum ["full" "parameters"]);
default = null;
description = ''
Show full signature of the callable. Only shows parameters if disabled.
default value is:
```nix
"full"
```
'';
};
"documentation" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Show documentation.
default value is:
```nix
true
```
'';
};
};
};
"typing" = {
"autoClosingAngleBrackets" = {
"enable" = mkOption {
type = types.nullOr (types.bool);
default = null;
description = ''
Whether to insert closing angle brackets when typing an opening angle bracket of a generic argument list.
default value is:
```nix
false
```
'';
};
};
};
"workspace" = {
"symbol" = {
"search" = {
"kind" = mkOption {
type = types.nullOr (types.enum ["only_types" "all_symbols"]);
default = null;
description = ''
Workspace symbol search kind.
default value is:
```nix
"only_types"
```
'';
};
"limit" = mkOption {
type = types.nullOr (types.addCheck types.int (x: x >= 0));
default = null;
description = ''
Limits the number of items returned from a workspace symbol search (Defaults to 128).
Some clients like vs-code issue new searches on result filtering and don't require all results to be returned in the initial search.
Other clients requires all results upfront and might require a higher limit.
default value is:
```nix
128
```
'';
};
"scope" = mkOption {
type = types.nullOr (types.enum ["workspace" "workspace_and_dependencies"]);
default = null;
description = ''
Workspace symbol search scope.
default value is:
```nix
"workspace"
```
'';
};
};
};
};
}