Skip to content

Commit

Permalink
Auto merge of rust-lang#15313 - prez:patch-1, r=lnicola
Browse files Browse the repository at this point in the history
docs: Add example on how to change configuration options in Kate

closes rust-lang#15305
  • Loading branch information
bors committed Jul 20, 2023
2 parents 6b8eb75 + b6f31f0 commit cbf3713
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions docs/user/manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -449,27 +449,24 @@ You'll need to close and reopen all .rs and Cargo files, or to restart the IDE,
Support for the language server protocol is built into Kate through the LSP plugin, which is included by default.
It is preconfigured to use rust-analyzer for Rust sources since Kate 21.12.

Earlier versions allow 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
To change rust-analyzer config options, start from the following example and put it into Kate's "User Server Settings" tab (located under the LSP Client settings):
[source,json]
----
{
"servers": {
"rust": {
"command": ["rust-analyzer"],
"rootIndicationFileNames": ["Cargo.lock", "Cargo.toml"],
"url": "https://github.com/rust-lang/rust-analyzer",
"highlightingModeRegex": "^Rust$"
},
"initializationOptions": {
"cachePriming": {
"enable": false
},
"check": {
"allTargets": false
},
"checkOnSave": false
}
}
}
}
----
Then click on apply, and restart the LSP server for your rust project.

Expand Down

0 comments on commit cbf3713

Please sign in to comment.