This PR fixes an issue on new NeoVim versions that would cause the language server to display an error when using certain code actions. (For some reason, NeoVim recently decided to diverge from VS Code in terms of when it emits code action resolution requests, which means that not setting the `data?` field won't preclude NeoVim from emitting a request anymore, which in turn means that the server can't resolve the code action.)
44 lines
1.5 KiB
Text
44 lines
1.5 KiB
Text
{"textDocument": {"uri": "file:///tryThisCodeAction.lean"},
|
|
"range":
|
|
{"start": {"line": 0, "character": 22}, "end": {"line": 0, "character": 22}},
|
|
"context": {"diagnostics": []}}
|
|
[{"title": "Try this: simp only",
|
|
"kind": "quickfix",
|
|
"edit":
|
|
{"documentChanges":
|
|
[{"textDocument": {"version": 1, "uri": "file:///tryThisCodeAction.lean"},
|
|
"edits":
|
|
[{"range":
|
|
{"start": {"line": 0, "character": 21},
|
|
"end": {"line": 0, "character": 26}},
|
|
"newText": "simp only"}]}]},
|
|
"data":
|
|
{"providerResultIndex": 0,
|
|
"providerName":
|
|
"_private.Lean.Meta.Tactic.TryThis.0.Lean.Meta.Tactic.TryThis.tryThisProvider",
|
|
"params":
|
|
{"textDocument": {"uri": "file:///tryThisCodeAction.lean"},
|
|
"range":
|
|
{"start": {"line": 0, "character": 22},
|
|
"end": {"line": 0, "character": 22}},
|
|
"context": {"diagnostics": []}}}}]
|
|
Resolution of Try this: simp only:
|
|
{"title": "Try this: simp only",
|
|
"kind": "quickfix",
|
|
"edit":
|
|
{"documentChanges":
|
|
[{"textDocument": {"version": 1, "uri": "file:///tryThisCodeAction.lean"},
|
|
"edits":
|
|
[{"range":
|
|
{"start": {"line": 0, "character": 21},
|
|
"end": {"line": 0, "character": 26}},
|
|
"newText": "simp only"}]}]},
|
|
"data":
|
|
{"providerResultIndex": 0,
|
|
"providerName":
|
|
"_private.Lean.Meta.Tactic.TryThis.0.Lean.Meta.Tactic.TryThis.tryThisProvider",
|
|
"params":
|
|
{"textDocument": {"uri": "file:///tryThisCodeAction.lean"},
|
|
"range":
|
|
{"start": {"line": 0, "character": 22}, "end": {"line": 0, "character": 22}},
|
|
"context": {"diagnostics": []}}}}
|