Skip to content

Commit 1f7de30

Browse files
committed
Add documentation
1 parent bacd042 commit 1f7de30

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/dev/lsp-extensions.md

+24
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,30 @@ Invoking code action at this position will yield two code actions for importing
9797
* Is a fixed two-level structure enough?
9898
* Should we devise a general way to encode custom interaction protocols for GUI refactorings?
9999

100+
## Lazy assists with `ResolveCodeAction`
101+
102+
**Issue:** https://github.com/microsoft/language-server-protocol/issues/787
103+
104+
**Client Capability** `{ "resolveCodeAction": boolean }`
105+
106+
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.
107+
108+
After the client got the id, it should then call `experimental/resolveCodeAction` command on the server and provide the following payload:
109+
110+
```typescript
111+
interface ResolveCodeActionParams {
112+
id: string;
113+
codeActionParams: lc.CodeActionParams;
114+
}
115+
```
116+
117+
As a result of the command call the client will get the respective workspace edit (`lc.WorkspaceEdit`).
118+
119+
### Unresolved Questions
120+
121+
* Apply smarter filtering for ids?
122+
* Upon `resolveCodeAction` command only call the assits which should be resolved and not all of them?
123+
100124
## Parent Module
101125

102126
**Issue:** https://github.com/microsoft/language-server-protocol/issues/1002

0 commit comments

Comments
 (0)