You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue exists to announce changes which might affect rust-analyzer plugins for different editors.
If you maintain such a plugin, consider subscribing to this issue.
All our protocol extensions are documented at lsp-extensions.md. I'll try to remember to leave a comment on this issue if I modify that file.
Reacted by Iago-lito, Jason Williams, CJ, Changsheng Wu, Eric Shimizu Karbstein, Andrew Hlynskyi, Virgiel, Suraj, Tom, astrale-sharp and 4 more
Reacted by Yosh, Dustin Bensing, rkxx08, CJ, Eric Shimizu Karbstein, Andrew Hlynskyi, Virgiel and astrale-sharp
After #4632, all our current extensions are documented. There were a bunch of minor changes here and there. Most notably some requests were moved from rust-analyzer/foo to experimental/foo, in hope that this might be useful for other servers, and to mark the extensions we intend to upstream to the protocol itself.
Notably, inlay hints and runnables are are still unchanged: i want to upstream these two as well, but I am not too happy with their current state, and I don't have time to polish them right now. So i opted for documenting them as is, and cleaning up later.
#4710 changes API for runnables. The idea is that it's the client who is reponsible for running stuff, to make it possible to, eg, inject debugger support or other custom tools. So, rust-analzyer provides a more abstract representation of a cargo command, to make it easier for the client to make sense of it.
15:04:42|~/projects/rust-analyzer/editors/code|master✓
λ rustup component add --toolchain nightly rust-analyzer-preview
info: component 'rust-analyzer-preview' for target 'x86_64-unknown-linux-gnu' is up to date
15:04:46|~/projects/rust-analyzer/editors/code|master✓
λ rustup run nightly rust-analyzer --version
rust-analyzer f5a4a4b
The "officially recommended" binary at the moment is still the one from releases in this repo, but rustup one should be fine as well.
Reacted by Kirill Bulatov, Heyward Fann, Avi Dessauer, CJ, Vitalii Kryvenko, Jan Ph. H., runiq, Igor Aleksanov, Harry Lee, Luke and 2 more
Although lsp-extensions.md hasn't been updated, commit 18ca22a extended ServerStatusParams with a new field called workspaceInfo.
#17287 removes this again as it feels out of place for the status notification. (I didn't post about it here when adding it because I was mainly experimenting, should've made that clear from the start)
Commit ef59b49 by @roife extended the args of Runnable with an optional cwd field for the cargo kind. It seems cwd sould be used instead of workspaceRoot when it is present.
On the other hand, the log of commit a55e8bf has this sentence: "When the kind of runnable is bin", but according to the docs, kind can only be cargo.
On the other hand, the log of commit a55e8bf has this sentence: "When the kind of runnable is bin", but according to the docs, kind can only be cargo.
There was some ambiguity regarding the term kind due to my previous lack of clarity. In this context, kind refers to ide::Runnable.kind, which is of type RunnableKind (can be Test, Bin, Bench, etc.), is used internally within r-a.
The kind you mentioned refers to rust_analyzer::lsp_ext::Runnable.kind, which is of type rust_analyzer::lsp_ext::RunnableKind (and can only be cargo), is used for responses sent to the client.
#16840 added runnable support to rust-project.json. I'll create a PR to update the manual, but the newly added rustdocs on project_json.rs will are a reasonable starting point for the new behavior.
#17547 changes the runnable payload, notably it now has an environment field for env vars to be set, always sents a cwd working directory that a client should honor, gets rid of cargoExtraArgs and bakes that into cargoArgs (as there is no need for the client to do this) and drops the expectTest field in favor of the env var field.
#17587 adds a rust-analyzer.rename command that triggers the editor.action.rename. This allows extract symbols assists to cause the editor to prompt the user to rename the newly extracted symbol in place.
Heads up, #17647 changes two command names. This is unfortunately a breaking change but the previous names were accidentally plainly copied from VSCode whereas they should've been more rust-analyzer specific
Heads up, #17647 changes two command names. This is unfortunately a breaking change but the previous names were accidentally plainly copied from VSCode whereas they should've been more rust-analyzer specific
To save the extra click (and make this thread searchable for changes in the future):
The commands editor.action.triggerParameterHints and editor.action.rename are now renamed to rust-analyzer.triggerParameterHints and rust-analyzer.rename
#18412 disabled the generation of .gz binary artifacts for Windows. If your client downloads rust-analyzer from GitHub, you should switch to the .zip ones.
We might make a similar change to the Linux ones in the future.
Activity
matklad commentedon May 27, 2020
After #4632, all our current extensions are documented. There were a bunch of minor changes here and there. Most notably some requests were moved from
rust-analyzer/footoexperimental/foo, in hope that this might be useful for other servers, and to mark the extensions we intend to upstream to the protocol itself.Notably, inlay hints and runnables are are still unchanged: i want to upstream these two as well, but I am not too happy with their current state, and I don't have time to polish them right now. So i opted for documenting them as is, and cleaning up later.
matklad commentedon Jun 1, 2020
#4688 documents our
initilizationOptions.matklad commentedon Jun 3, 2020
#4710 changes API for runnables. The idea is that it's the client who is reponsible for running stuff, to make it possible to, eg, inject debugger support or other custom tools. So, rust-analzyer provides a more abstract representation of a cargo command, to make it easier for the client to make sense of it.
matklad commentedon Jun 5, 2020
#4717 adds API for lazily computing code action edits.
[-]Client Changes[/-][+]Anouncements: Client Changes[/+]matklad commentedon Jul 2, 2020
#5188 adds status notification.
matklad commentedon Jul 7, 2020
adds "memory usage" command: #5244
matklad commentedon Jul 7, 2020
#4972 will switch to gzipping release artifacts.
matklad commentedon Jul 8, 2020
rust-analyzer is available via rustup.
The "officially recommended" binary at the moment is still the one from releases in this repo, but rustup one should be fine as well.
matklad commentedon Aug 17, 2020
#5782
matklad commentedon Sep 2, 2020
#5930 adapts the latest changes of the semantic tokens
matklad commentedon Oct 17, 2020
Flexible runnables configuration:
p3achyjr commentedon Nov 10, 2020
I am adding a rust-analyzer action for #6462, and will be changing the hash.
matklad commentedon Nov 10, 2020
#6521 removes our custom support for code action resolving in favor of one provided by LSP 1.16.
48 remaining items
Veykril commentedon Mar 6, 2024
#16773 puts the test explorer behind a
testExplorercapability, note that the lsp extension is likely to still changenemethf commentedon Mar 27, 2024
#16840 by @Wilfred is a pending PR that allows rust-project.json to include arbitrary shell commands for runnables
nemethf commentedon Apr 27, 2024
Although lsp-extensions.md hasn't been updated, commit 18ca22a extended ServerStatusParams with a new field called workspaceInfo.
Veykril commentedon May 23, 2024
#17287 removes this again as it feels out of place for the status notification. (I didn't post about it here when adding it because I was mainly experimenting, should've made that clear from the start)
nemethf commentedon May 25, 2024
Commit ef59b49 by @roife extended the args of Runnable with an optional
cwdfield for the cargo kind. It seems cwd sould be used instead of workspaceRoot when it is present.On the other hand, the log of commit a55e8bf has this sentence: "When the
kindof runnable isbin", but according to the docs,kindcan only becargo.roife commentedon May 25, 2024
There was some ambiguity regarding the term
kinddue to my previous lack of clarity. In this context,kindrefers toide::Runnable.kind, which is of typeRunnableKind(can beTest,Bin,Bench, etc.), is used internally within r-a.The
kindyou mentioned refers torust_analyzer::lsp_ext::Runnable.kind, which is of typerust_analyzer::lsp_ext::RunnableKind(and can only becargo), is used for responses sent to the client.davidbarsky commentedon Jun 11, 2024
#16840 added runnable support to
rust-project.json. I'll create a PR to update the manual, but the newly added rustdocs onproject_json.rswill are a reasonable starting point for the new behavior.Veykril commentedon Jul 6, 2024
#17547 changes the runnable payload, notably it now has an
environmentfield for env vars to be set, always sents acwdworking directory that a client should honor, gets rid ofcargoExtraArgsand bakes that intocargoArgs(as there is no need for the client to do this) and drops theexpectTestfield in favor of the env var field.joshka commentedon Jul 14, 2024
#17587 adds a rust-analyzer.rename command that triggers the editor.action.rename. This allows extract symbols assists to cause the editor to prompt the user to rename the newly extracted symbol in place.
Veykril commentedon Jul 22, 2024
Heads up, #17647 changes two command names. This is unfortunately a breaking change but the previous names were accidentally plainly copied from VSCode whereas they should've been more rust-analyzer specific
joshka commentedon Jul 22, 2024
To save the extra click (and make this thread searchable for changes in the future):
lnicola commentedon Oct 29, 2024
#18412 disabled the generation of
.gzbinary artifacts for Windows. If your client downloads rust-analyzer from GitHub, you should switch to the.zipones.We might make a similar change to the Linux ones in the future.
nemethf commentedon Jan 21, 2025
#18813 by @Giga-Bowser added rust-analyzer/viewSyntaxTree and removed rust-analyzer/syntaxTree.
nemethf commentedon Apr 10, 2025
commit 99a2b67 by @davidbarsky adds a new undocumented extension:
experimental/childModules.Merge pull request #4604 from rust-lang/rustup-2025-09-26