about summary refs log tree commit diff
path: root/docs/dev
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-03 20:31:25 +0000
committerGitHub <noreply@github.com>2020-06-03 20:31:25 +0000
commit65a3cc21edd8acd93b728d094514bafddcb1757a (patch)
tree8327b508541f80ff539c2b13559e7f2df2fe4d6b /docs/dev
parent794f6da821c5d6e2490b996baffe162e4753262d (diff)
parent6cd2e04bd2a703c335566224e8b6bf773b83c0c6 (diff)
downloadrust-65a3cc21edd8acd93b728d094514bafddcb1757a.tar.gz
rust-65a3cc21edd8acd93b728d094514bafddcb1757a.zip
Merge #4717
4717: Implementation of lazy assits r=matklad a=mcrakhman



Co-authored-by: Mikhail Rakhmanov <rakhmanov.m@gmail.com>
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/lsp-extensions.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index 647cf610756..7f7940d0b6a 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -97,6 +97,30 @@ Invoking code action at this position will yield two code actions for importing
 * Is a fixed two-level structure enough?
 * Should we devise a general way to encode custom interaction protocols for GUI refactorings?
 
+## Lazy assists with `ResolveCodeAction`
+
+**Issue:** https://github.com/microsoft/language-server-protocol/issues/787
+
+**Client Capability** `{ "resolveCodeAction": boolean }`
+
+If this capability is set, the assists will be computed lazily. Thus `CodeAction` returned from the server will only contain `id` but not `edit` or `command` fields. The only exclusion from the rule is the diagnostic edits.
+
+After the client got the id, it should then call `experimental/resolveCodeAction` command on the server and provide the following payload:
+
+```typescript
+interface ResolveCodeActionParams {
+    id: string;
+    codeActionParams: lc.CodeActionParams;
+}
+```
+
+As a result of the command call the client will get the respective workspace edit (`lc.WorkspaceEdit`).
+
+### Unresolved Questions
+
+* Apply smarter filtering for ids?
+* Upon `resolveCodeAction` command only call the assits which should be resolved and not all of them?
+
 ## Parent Module
 
 **Issue:** https://github.com/microsoft/language-server-protocol/issues/1002