rust-analyzer/editors/code/src
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
..
ast_inspector.ts Flatten commands.ts 2020-05-25 12:14:44 +02:00
client.ts feat: gate custom clint-side commands behind capabilities 2021-07-30 19:16:33 +03:00
commands.ts refactor: Remove unnecessary command 2021-07-27 18:29:22 -04:00
config.ts Removed all dead config accessors. 2021-07-23 07:50:37 -06:00
ctx.ts fix 2021-06-07 17:56:40 +01:00
debug.ts Use explicit rustc commit-hash 2021-04-22 18:59:03 +03:00
inlay_hints.ts Fix how and when old inlay hint decorations are disposed 2021-04-26 20:29:54 -04:00
lsp_ext.ts docs: Update the lsp-extensions.md with the Hover Range capability 2021-07-27 18:31:21 -04:00
main.ts fix: Unregister the removed command 2021-07-27 18:29:22 -04:00
net.ts Rename the old server before update 2021-07-13 09:10:25 +03:00
persistent_state.ts Style fix 2021-05-23 13:43:06 +03:00
run.ts minor: explicitly set the focus to false 2021-05-26 13:04:01 +03:00
snippets.ts fix: cursor position after item move command 2021-05-24 13:17:28 -03:00
tasks.ts fix: fix shell injection in task spawning 2021-05-31 20:11:36 +03:00
toolchain.ts fix: clean-up #8951 2021-06-15 13:29:02 -04:00
util.ts Use explicit rustc commit-hash 2021-04-22 18:59:03 +03:00