diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-08 06:04:09 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-08 06:04:09 +0000 |
| commit | dd12184e4fec633e75fe18fb04e0ef8f2bb037e0 (patch) | |
| tree | d2afce8832d0a785a9e2d27291ba245c1bb766b9 /docs | |
| parent | 9c8763714c018c5b93a49dfec5f51c137c58c95d (diff) | |
| parent | b39578d81633271c3f267ba2a8020ffb14cf8542 (diff) | |
| download | rust-dd12184e4fec633e75fe18fb04e0ef8f2bb037e0.tar.gz rust-dd12184e4fec633e75fe18fb04e0ef8f2bb037e0.zip | |
Merge #8759
8759: docs: Add Kate installation section r=matklad a=meven Replaces https://github.com/rust-analyzer/rust-analyzer.github.io/pull/111#issuecomment-834797031 Co-authored-by: Méven Car <meven29@gmail.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/user/manual.adoc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/user/manual.adoc b/docs/user/manual.adoc index ce62d928d06..ddd8765801c 100644 --- a/docs/user/manual.adoc +++ b/docs/user/manual.adoc @@ -383,6 +383,33 @@ If available in PATH or in some standard location, `rust-analyzer` is detected a If `rust-analyzer` is not detected, Corrosion will prompt you for configuration of your Rust toolchain and language server with a link to the __Window > Preferences > Rust__ preference page; from here a button allows to download and configure `rust-analyzer`, but you can also reference another installation. You'll need to close and reopen all .rs and Cargo files, or to restart the IDE, for this change to take effect. +=== Kate Text Editor + +Support for the language server protocol is built into Kate through the LSP plugin, which is included by default. +It is preconfigured to use Rls for rust sources, but allows you to use rust-analyzer through a simple settings change. +In the LSP Client settings of Kate, copy the content of the third tab "default parameters" to the second tab "server configuration". +Then in the configuration replace: +[source,json] +---- + "rust": { + "command": ["rls"], + "rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"], + "url": "https://github.com/rust-lang/rls", + "highlightingModeRegex": "^Rust$" + }, +---- +With +[source,json] +---- + "rust": { + "command": ["rust-analyzer"], + "rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"], + "url": "https://github.com/rust-analyzer/rust-analyzer", + "highlightingModeRegex": "^Rust$" + }, +---- +Then click on apply, and restart the LSP server for your rust project. + == Configuration **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] |
