about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-05-02 07:22:43 +0000
committerbors <bors@rust-lang.org>2023-05-02 07:22:43 +0000
commit1ad58a42aae6593f7714bb32c1dc9a0a74b02e04 (patch)
tree0625ad1dd2916f1b60548b2ad6b582e169e94df1 /editors/code/src
parent98e76bd90f81a0f0c94854c26ae2d9d36e8f88dc (diff)
parent5a97a326a910db4011fb5b060aeb555bfbd840d6 (diff)
downloadrust-1ad58a42aae6593f7714bb32c1dc9a0a74b02e04.tar.gz
rust-1ad58a42aae6593f7714bb32c1dc9a0a74b02e04.zip
Auto merge of #14711 - Veykril:highlight-captures, r=Veykril
feat: Highlight closure captures when cursor is on pipe or move keyword

This runs into the same issue on vscode as exit points for `->`, where highlights are only triggered on identifiers, https://github.com/rust-lang/rust-analyzer/issues/9395

Though putting the cursor on `move` should at least work.
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/lsp_ext.ts9
1 files changed, 3 insertions, 6 deletions
diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts
index 754d43618a4..82955acf25e 100644
--- a/editors/code/src/lsp_ext.ts
+++ b/editors/code/src/lsp_ext.ts
@@ -10,12 +10,9 @@ export const hover = new lc.RequestType<
     HoverParams,
     (lc.Hover & { actions: CommandLinkGroup[] }) | null,
     void
->("textDocument/hover");
-export type HoverParams = { position: lc.Position | lc.Range } & Omit<
-    lc.TextDocumentPositionParams,
-    "position"
-> &
-    lc.WorkDoneProgressParams;
+>(lc.HoverRequest.method);
+export type HoverParams = { position: lc.Position | lc.Range } & Omit<lc.HoverParams, "position">;
+
 export type CommandLink = {
     /**
      * A tooltip for the command, when represented in the UI.