diff options
author | Aleksey Kladov <[email protected]> | 2020-11-10 17:20:01 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-11-10 17:48:46 +0000 |
commit | 7d2eb000b078143e9fa6225d00ef52fc7c606fdf (patch) | |
tree | 580d90bd250ffcd4b1c66570e5601761e58d1057 /docs/dev | |
parent | ada5a88f8fd0a79af7ad6e0411acc1cce9ef32d5 (diff) |
Switch to upstream protocol for resolving code action
Note that we have to maintain custom implementation on the client
side: I don't see how to marry bulitin resolve support with groups and
snippets.
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/lsp-extensions.md | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 780f5cb91..77d4e0ec9 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -1,5 +1,5 @@ | |||
1 | <!--- | 1 | <!--- |
2 | lsp_ext.rs hash: 286f8bbac885531a | 2 | lsp_ext.rs hash: 4f86fb54e4b2870e |
3 | 3 | ||
4 | If you need to change the above hash to make the test pass, please check if you | 4 | If you need to change the above hash to make the test pass, please check if you |
5 | need to adjust this doc as well and ping this issue: | 5 | need to adjust this doc as well and ping this issue: |
@@ -109,30 +109,6 @@ Invoking code action at this position will yield two code actions for importing | |||
109 | * Is a fixed two-level structure enough? | 109 | * Is a fixed two-level structure enough? |
110 | * Should we devise a general way to encode custom interaction protocols for GUI refactorings? | 110 | * Should we devise a general way to encode custom interaction protocols for GUI refactorings? |
111 | 111 | ||
112 | ## Lazy assists with `ResolveCodeAction` | ||
113 | |||
114 | **Issue:** https://github.com/microsoft/language-server-protocol/issues/787 | ||
115 | |||
116 | **Client Capability** `{ "resolveCodeAction": boolean }` | ||
117 | |||
118 | 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. | ||
119 | |||
120 | After the client got the id, it should then call `experimental/resolveCodeAction` command on the server and provide the following payload: | ||
121 | |||
122 | ```typescript | ||
123 | interface ResolveCodeActionParams { | ||
124 | id: string; | ||
125 | codeActionParams: lc.CodeActionParams; | ||
126 | } | ||
127 | ``` | ||
128 | |||
129 | As a result of the command call the client will get the respective workspace edit (`lc.WorkspaceEdit`). | ||
130 | |||
131 | ### Unresolved Questions | ||
132 | |||
133 | * Apply smarter filtering for ids? | ||
134 | * Upon `resolveCodeAction` command only call the assits which should be resolved and not all of them? | ||
135 | |||
136 | ## Parent Module | 112 | ## Parent Module |
137 | 113 | ||
138 | **Issue:** https://github.com/microsoft/language-server-protocol/issues/1002 | 114 | **Issue:** https://github.com/microsoft/language-server-protocol/issues/1002 |