This PR adds support for interactivity to the combined "try this" messages that were introduced in #9966. In doing so, it moves the link to apply a suggestion to a separate `[apply]` button in front of the suggestion. Hints with diffs remain unchanged, as they did not previously support interacting with terms in the diff, either. <img width="379" height="256" alt="Suggestion with interactive message" src="https://github.com/user-attachments/assets/7838ebf6-0613-46e7-bc88-468a05acbf51" />
16 lines
706 B
Text
16 lines
706 B
Text
{"textDocument": {"uri": "file:///builtinCodeactions.lean"},
|
|
"range":
|
|
{"start": {"line": 5, "character": 4}, "end": {"line": 5, "character": 4}},
|
|
"context": {"diagnostics": []}}
|
|
[{"title":
|
|
"Try this: simp only [AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] at h",
|
|
"kind": "quickfix",
|
|
"edit":
|
|
{"documentChanges":
|
|
[{"textDocument": {"version": 1, "uri": "file:///builtinCodeactions.lean"},
|
|
"edits":
|
|
[{"range":
|
|
{"start": {"line": 5, "character": 2},
|
|
"end": {"line": 5, "character": 97}},
|
|
"newText":
|
|
"simp only [AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA,\n aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa] at h"}]}]}}]
|