Skip to content

Announcements: Client Changes #4604

Open

Description

@matklad

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.

Activity

  1. matklad commented on May 27, 2020

    @matklad
    ContributorAuthor

    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.

  2. pinned this issue on Jun 1, 2020
  3. matklad commented on Jun 1, 2020

    @matklad
    ContributorAuthor

    #4688 documents our initilizationOptions.

  4. matklad commented on Jun 3, 2020

    @matklad
    ContributorAuthor

    #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.

  5. matklad commented on Jun 5, 2020

    @matklad
    ContributorAuthor

    #4717 adds API for lazily computing code action edits.

  6. changed the title [-]Client Changes[/-] [+]Anouncements: Client Changes[/+] on Jun 15, 2020
  7. matklad commented on Jul 2, 2020

    @matklad
    ContributorAuthor

    #5188 adds status notification.

  8. matklad commented on Jul 7, 2020

    @matklad
    ContributorAuthor

    adds "memory usage" command: #5244

  9. matklad commented on Jul 7, 2020

    @matklad
    ContributorAuthor

    #4972 will switch to gzipping release artifacts.

  10. matklad commented on Jul 8, 2020

    @matklad
    ContributorAuthor

    rust-analyzer is available via rustup.

    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.

  11. matklad commented on Aug 17, 2020

    @matklad
    ContributorAuthor
  12. matklad commented on Sep 2, 2020

    @matklad
    ContributorAuthor

    #5930 adapts the latest changes of the semantic tokens

  13. matklad commented on Oct 17, 2020

    @matklad
    ContributorAuthor
  14. p3achyjr commented on Nov 10, 2020

    @p3achyjr

    I am adding a rust-analyzer action for #6462, and will be changing the hash.

  15. matklad commented on Nov 10, 2020

    @matklad
    ContributorAuthor

    #6521 removes our custom support for code action resolving in favor of one provided by LSP 1.16.

  16. 48 remaining items

  17. Veykril commented on Mar 6, 2024

    @Veykril
    Member

    #16773 puts the test explorer behind a testExplorer capability, note that the lsp extension is likely to still change

  18. nemethf commented on Mar 27, 2024

    @nemethf
    Contributor

    #16840 by @Wilfred is a pending PR that allows rust-project.json to include arbitrary shell commands for runnables

  19. nemethf commented on Apr 27, 2024

    @nemethf
    Contributor

    Although lsp-extensions.md hasn't been updated, commit 18ca22a extended ServerStatusParams with a new field called workspaceInfo.

  20. Veykril commented on May 23, 2024

    @Veykril
    Member

    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)

  21. nemethf commented on May 25, 2024

    @nemethf
    Contributor

    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.

  22. roife commented on May 25, 2024

    @roife
    Member

    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.

  23. davidbarsky commented on Jun 11, 2024

    @davidbarsky
    Contributor

    #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.

  24. Veykril commented on Jul 6, 2024

    @Veykril
    Member

    #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.

  25. joshka commented on Jul 14, 2024

    @joshka
    Contributor

    #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.

  26. Veykril commented on Jul 22, 2024

    @Veykril
    Member

    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

  27. joshka commented on Jul 22, 2024

    @joshka
    Contributor

    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

  28. lnicola commented on Oct 29, 2024

    @lnicola
    Member

    #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.

  29. nemethf commented on Jan 21, 2025

    @nemethf
    Contributor

    #18813 by @Giga-Bowser added rust-analyzer/viewSyntaxTree and removed rust-analyzer/syntaxTree.

  30. nemethf commented on Apr 10, 2025

    @nemethf
    Contributor

    commit 99a2b67 by @davidbarsky adds a new undocumented extension: experimental/childModules.

  31. added a commit that references this issue on Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: tracking issueS-unactionableIssue requires feedback, design decisions or is blocked on other work

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions