diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2023-10-02 22:14:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-02 22:14:19 +0200 |
commit | 4a09c178a19097c295521892c889f1f196fff100 (patch) | |
tree | aaf1d51961f674e08cb9f52d57d1b733b7695224 /runtime/lua/vim/lsp/_snippet.lua | |
parent | 09a17f91d0d362c6e58bfdbe3ccdeacffb0b44b9 (diff) | |
download | rneovim-4a09c178a19097c295521892c889f1f196fff100.tar.gz rneovim-4a09c178a19097c295521892c889f1f196fff100.tar.bz2 rneovim-4a09c178a19097c295521892c889f1f196fff100.zip |
feat(lsp): fallback to code-action command on resolve failure (#25464)
The haskell-language-server supports resolve only for a subset of code
actions. For many code actions trying to resolve the `edit` property
results in an error, but the unresolved action already contains a
command that can be executed without issue.
The protocol specification is unfortunately a bit vague about this,
and what the haskell-language-server does seems to be valid.
Example:
newtype Dummy = Dummy Int
instance Num Dummy where
Triggering code actions on "Num Dummy" and choosing "Add placeholders
for all missing methods" resulted in:
-32601: No plugin enabled for SMethod_CodeActionResolve, potentially available: explicit-fields, importLens, hlint, overloaded-record-dot
With this change it will insert the missing methods:
instance Num Dummy where
(+) = _
(-) = _
(*) = _
negate = _
abs = _
signum = _
fromInteger = _
Diffstat (limited to 'runtime/lua/vim/lsp/_snippet.lua')
0 files changed, 0 insertions, 0 deletions