diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-08 07:04:09 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-08 07:04:09 +0100 |
commit | dd12184e4fec633e75fe18fb04e0ef8f2bb037e0 (patch) | |
tree | d2afce8832d0a785a9e2d27291ba245c1bb766b9 /docs | |
parent | 9c8763714c018c5b93a49dfec5f51c137c58c95d (diff) | |
parent | b39578d81633271c3f267ba2a8020ffb14cf8542 (diff) |
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 <[email protected]>
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 ce62d928d..ddd876580 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 | |||
383 | 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. | 383 | 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. |
384 | You'll need to close and reopen all .rs and Cargo files, or to restart the IDE, for this change to take effect. | 384 | You'll need to close and reopen all .rs and Cargo files, or to restart the IDE, for this change to take effect. |
385 | 385 | ||
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 | |||
386 | == Configuration | 413 | == Configuration |
387 | 414 | ||
388 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] | 415 | **Source:** https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/rust-analyzer/src/config.rs[config.rs] |