Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcements: Client Changes #4604

Open
matklad opened this issue May 25, 2020 · 57 comments
Open

Announcements: Client Changes #4604

matklad opened this issue May 25, 2020 · 57 comments
Labels
C-tracking-issue Category: tracking issue S-unactionable Issue requires feedback, design decisions or is blocked on other work

Comments

@matklad
Copy link
Member

matklad commented May 25, 2020

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.

@matklad
Copy link
Member Author

matklad commented 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/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.

@matklad matklad pinned this issue Jun 1, 2020
@matklad
Copy link
Member Author

matklad commented Jun 1, 2020

#4688 documents our initilizationOptions.

@matklad
Copy link
Member Author

matklad commented 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
Copy link
Member Author

matklad commented Jun 5, 2020

#4717 adds API for lazily computing code action edits.

@matklad matklad changed the title Client Changes Anouncements: Client Changes Jun 15, 2020
@matklad
Copy link
Member Author

matklad commented Jul 2, 2020

#5188 adds status notification.

@matklad
Copy link
Member Author

matklad commented Jul 7, 2020

adds "memory usage" command: #5244

@matklad
Copy link
Member Author

matklad commented Jul 7, 2020

#4972 will switch to gzipping release artifacts.

@matklad
Copy link
Member Author

matklad commented Jul 8, 2020

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.

@matklad
Copy link
Member Author

matklad commented Aug 17, 2020

#5782

@matklad
Copy link
Member Author

matklad commented Sep 2, 2020

#5930 adapts the latest changes of the semantic tokens

@matklad
Copy link
Member Author

matklad commented Oct 17, 2020

@p3achyjr
Copy link

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

@matklad
Copy link
Member Author

matklad commented Nov 10, 2020

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

@matklad
Copy link
Member Author

matklad commented Dec 8, 2020

#6761 adds a rust-analyzer --print-config-schema command which prints JSON-schema for the configuration for rust-analyzer, in the style of package.json. This should allow non-VS Code clients to show better auto-complete & docs for user config, and should also help to ensure that the defaults are the same between vscode and other editors.

@lnicola
Copy link
Member

lnicola commented Dec 24, 2020

In #6996 we want to stop releasing uncompressed binaries. Clients that can automatically install the LSP server binary should download the .gz file instead.

We've also changed the naming convention to include the platform tuple:

  • instead of rust-analyzer-windows.exe, use rust-analyzer-x86_64-pc-windows-msvc.gz
  • instead of rust-analyzer-linux, use rust-analyzer-x86_64-unknown-linux-gnu.gz
  • instead of rust-analyzer-mac, use rust-analyzer-x86_64-apple-darwin.gz

This allows us to support new platforms more easily, speeds up downloads and avoids wasting disk space.

@lnicola
Copy link
Member

lnicola commented Jan 5, 2021

#7068 adds a command to show our HIR representation of a function.

@lnicola lnicola added the S-unactionable Issue requires feedback, design decisions or is blocked on other work label Jan 17, 2021
@edwin0cheng
Copy link
Member

edwin0cheng commented Jan 28, 2021

#7412 adds a new readyPartial in status notification :

export type Status = "loading" | "ready" | "readyPartial" | "invalid" | "needsReload";

@lnicola
Copy link
Member

lnicola commented Feb 10, 2021

#7625 adds a "copy runnable command line" command.

@matklad
Copy link
Member Author

matklad commented Feb 17, 2021

It is now possible to use ut8 coordinate space for positions and ranges: #7657

@matklad
Copy link
Member Author

matklad commented Mar 22, 2021

#8054 adds a new request to move functions, statements, etc up and down.

@jplatte

This comment has been minimized.

@matklad matklad changed the title Anouncements: Client Changes Announcements: Client Changes Mar 29, 2021
@matklad
Copy link
Member Author

matklad commented Apr 6, 2021

#8355 replaces rust-analyzer specific rust-analyzer/status with a more general experimental/serverStatus. close upstream issue: microsoft/language-server-protocol#511

@bstaletic
Copy link
Contributor

For the record, here the new status is documented as requiring serverStatus capability, when in rust-analyzer only reacted to serverStatusNotification.

Is that a typo in the docs or a bug in #8355?

@Veykril
Copy link
Member

Veykril commented Apr 29, 2022

#12010 will change a lot of the config keys we currently have, to make them more consistent as well as giving us the ability to extend configurations without breakage more easily. The PR description contains all the key changes as well as the few config keys that have been merged/split.

We are planning on merging the PR next week on monday on May 9th after our stable release to let it sit with nightly for a full week until the next stable release.

If you have points to raise regarding this please do so on zulip https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frust-analyzer/topic/r-a.20config.20format or on the linked PR.

@Veykril
Copy link
Member

Veykril commented May 4, 2022

Follow up to my previous comment, since most clients don't have the luxury of matching up server with client like the VSCode extension does we'll add a compatibility layer for some time that will keep accepting the old values (though we do want to remove this in the future at some point, so it would be great if the clients could nudge their users to updating their configs/if the clients could transition over to the new one)

@puremourning

This comment was marked as resolved.

@flodiebold

This comment was marked as resolved.

@puremourning

This comment was marked as resolved.

@flodiebold

This comment was marked as resolved.

@theli-ua

This comment was marked as resolved.

@puremourning

This comment was marked as resolved.

@Veykril
Copy link
Member

Veykril commented Dec 17, 2022

#13792 and 2 earlier PRs now allow controlling the flycheck (checkOnSave) features a bit via notifications. They have been described in the lsp-ext docs in #13792.

@HKalbasi
Copy link
Member

#13699 uses location links in inlay hints. It is not a lsp extension and it exists in standard lsp, but since no language server which I'm aware of is currently using this feature, it is very likely that some clients have not implemented this feature. See inlay hint label part in lsp spec.

@lnicola
Copy link
Member

lnicola commented Jan 1, 2023

If merged, #13876 will add a ZIP release artifact on Windows containing the language binary corresponding PDB. This should make life easier for Windows users since they no longer have to install anything. Ideally, we'd only keep producing one format, so we might drop the .gz version in the future.

There's also the alternative to produce .tar.gz everywhere (Windows can extract those, at least from the command line), but IMHO that's the worse format, perpetuated only because of historical reasons.

If you're maintaining a client that can automatically download rust-analyzer, consider leaving a comment on #13876 regarding your preferred format.

@ian-h-chamberlain
Copy link
Contributor

#13848 adds a client capability colorDiagnosticOutput to declare that a client is capable of rendering the "full compiler diagnostic" with ANSI color and style codes. VSCode is probably the only client using this for now. The docs have been updated as part of that PR as well.

@Veykril Veykril added the C-tracking-issue Category: tracking issue label Feb 9, 2023
@matklad
Copy link
Member Author

matklad commented Feb 14, 2023

#14141 adds support for positionEncoding = "utf-32", in addition to utf-8 and utf-16 which we support since forever.

@bruno-ortiz
Copy link
Contributor

#11557 adds a viewTree which allows to navigate through project dependencies

@Ddystopia
Copy link
Contributor

Ddystopia commented Apr 26, 2023

#14662 adds support for locally built documentation

@adenine-dev
Copy link
Contributor

#15081 adds support for a memory layout viewer.

@DropDemBits
Copy link
Contributor

#15876 allows a single TextDocumentEdit to have multiple SnippetTextEdits.

@adstep
Copy link

adstep commented Nov 28, 2023

#15979 adds commands for running selected tests

@nemethf
Copy link
Contributor

nemethf commented Feb 9, 2024

There's a recent change introducing the "Unindexed Project" notification. I think @davidbarsky forgot to mention it here. However, it is not clear to me what are the linkedProjects and how should the client determine the owner. Can you, David, explain this feature in more details? Thank you.

@HKalbasi
Copy link
Member

HKalbasi commented Mar 5, 2024

#16662 adds a set of lsp extension for supporting the vscode test explorer. If your client has a similar feature for exploring tests, you may find it useful. There are probably some problems around the lsp extension, or it may be too overfitted to the vscode, please raise an issue in those cases.

@Veykril
Copy link
Member

Veykril commented Mar 6, 2024

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

@nemethf
Copy link
Contributor

nemethf commented Mar 27, 2024

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

@nemethf
Copy link
Contributor

nemethf commented Apr 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: tracking issue S-unactionable Issue requires feedback, design decisions or is blocked on other work
Projects
None yet
Development

No branches or pull requests