Skip to content

Commit dd12184

Browse files
bors[bot]meven
andauthored
Merge #8759
8759: docs: Add Kate installation section r=matklad a=meven Replaces rust-analyzer/rust-analyzer.github.io#111 (comment) Co-authored-by: Méven Car <meven29@gmail.com>
2 parents 9c87637 + b39578d commit dd12184

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/user/manual.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,33 @@ If available in PATH or in some standard location, `rust-analyzer` is detected a
383383
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.
384384
You'll need to close and reopen all .rs and Cargo files, or to restart the IDE, for this change to take effect.
385385

386+
=== Kate Text Editor
387+
388+
Support for the language server protocol is built into Kate through the LSP plugin, which is included by default.
389+
It is preconfigured to use Rls for rust sources, but allows you to use rust-analyzer through a simple settings change.
390+
In the LSP Client settings of Kate, copy the content of the third tab "default parameters" to the second tab "server configuration".
391+
Then in the configuration replace:
392+
[source,json]
393+
----
394+
"rust": {
395+
"command": ["rls"],
396+
"rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"],
397+
"url": "https://github.com/rust-lang/rls",
398+
"highlightingModeRegex": "^Rust$"
399+
},
400+
----
401+
With
402+
[source,json]
403+
----
404+
"rust": {
405+
"command": ["rust-analyzer"],
406+
"rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"],
407+
"url": "https://github.com/rust-analyzer/rust-analyzer",
408+
"highlightingModeRegex": "^Rust$"
409+
},
410+
----
411+
Then click on apply, and restart the LSP server for your rust project.
412+
386413
== Configuration
387414

388415
**Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs]

0 commit comments

Comments
 (0)