Crates#
Server#
For more information about the LSP server, check crates-lsp.
Installation#
This Server supports automatic install.
Install this language server with M-xlsp-install-serverRETcrates-lspRET.
For more instructions on how to install manually, check here.
Debugger: Not available#
Available configurations#
lsp-crates-cache-directory#
Type: string
Default: ``
Directory in which to cache information about available crate versions, to avoid constantly querying crates.io.
Uses the OS-specific cache directory.
lsp-crates-diagnostics#
Type: boolean
Default: t
If false, disables diagnostics.
lsp-crates-executable#
Type: string
Default: crates-lsp
The crates-lsp executable to use.
Leave as just the executable name to use the default behavior of finding the
executable with variable exec-path.
lsp-crates-files#
Type: (vector string)
Default: [Cargo.toml]
List of exact filenames for which crates-lsp should provide feedback.
Avoids crates-lsp throwing errors if you happen to open a toml file with a
[dependencies] section, which does not contain Rust package names.
lsp-crates-inlay-hints#
Type: boolean
Default: t
If false, disables inlay hints.
lsp-crates-needs-update-hint#
Type: string
Default: ❌ {}
Text of inlay hint to show next to packages which should be updated. Any appearance of {} within the string, will be replaced by the newer version, which the package should be updated to.
lsp-crates-needs-update-severity#
Type: integer
Default: 3
Sets severity of diagnostics indicating that a package needs to be updated.
lsp-crates-server-store-path#
Type: file
Default: ~/work/lsp-mode/lsp-mode/docs/.eask/30.2/.cache/lsp/crates/
The path to the file in which crates-lsp will be stored.
lsp-crates-unknown-dep-severity#
Type: integer
Default: 2
Sets severity of diagnostics indicating that a package could not be looked up.
lsp-crates-up-to-date-hint#
Type: string
Default: ✓
Text of inlay hint to show, when package is up to date.
lsp-crates-up-to-date-severity#
Type: integer
Default: 4
Sets severity of diagnostics indicating that a package is up to date.
lsp-crates-use-api#
Type: boolean
Default: nil
If true, uses the Crates API instead of the Crate Index.
There are almost no reasons to ever enable this, and doing so puts a lot more
strain on the services provided by crates.io.