rust/crates/rust-analyzer
Aleksey Kladov be84f85c1d feat: gate custom clint-side commands behind capabilities
Some features of rust-analyzer requires support for custom commands on
the client side. Specifically, hover & code lens need this.

Stock LSP doesn't have a way for the server to know which client-side
commands are available. For that reason, we historically were just
sending the commands, not worrying whether the client supports then or
not.

That's not really great though, so in this PR we add infrastructure for
the client to explicitly opt-into custom commands, via `extensions`
field of the ClientCapabilities.

To preserve backwards compatability, if the client doesn't set the
field, we assume that it does support all custom commands. In the
future, we'll start treating that case as if the client doesn't support
commands.

So, if you maintain a rust-analyzer client and implement
`rust-analyzer/runSingle` and such, please also advertise this via a
capability.
2021-07-30 19:16:33 +03:00
..
src feat: gate custom clint-side commands behind capabilities 2021-07-30 19:16:33 +03:00
tests/slow-tests fix tests 2021-07-19 16:38:36 +03:00
build.rs minor: standard snippet 2021-05-07 21:46:25 +03:00
Cargo.toml Bump deps 2021-07-24 11:16:32 +03:00