lean4-htt/tests/lean/interactive/terminationBySuggestion.lean.expected.out
Marc Huisinga 9d427fdfcf
feat: "try this" messages with support for interactivity (#10524)
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"
/>
2025-10-13 13:39:03 +00:00

75 lines
2.7 KiB
Text

{"textDocument": {"uri": "file:///terminationBySuggestion.lean"},
"range":
{"start": {"line": 4, "character": 5}, "end": {"line": 4, "character": 5}},
"context": {"diagnostics": []}}
[{"title": "Try this: termination_by (n, m)",
"kind": "quickfix",
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 4, "character": 0},
"end": {"line": 4, "character": 15}},
"newText": "termination_by (n, m)"}]}]}}]
{"textDocument": {"uri": "file:///terminationBySuggestion.lean"},
"range":
{"start": {"line": 11, "character": 5}, "end": {"line": 11, "character": 5}},
"context": {"diagnostics": []}}
[{"title": "Try this: termination_by structural n",
"kind": "quickfix",
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 11, "character": 0},
"end": {"line": 11, "character": 15}},
"newText": "termination_by structural n"}]}]}}]
{"textDocument": {"uri": "file:///terminationBySuggestion.lean"},
"range":
{"start": {"line": 17, "character": 5}, "end": {"line": 17, "character": 5}},
"context": {"diagnostics": []}}
[{"title": "Try this: termination_by structural x => x",
"kind": "quickfix",
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 17, "character": 0},
"end": {"line": 17, "character": 15}},
"newText": "termination_by structural x => x"}]}]}}]
{"textDocument": {"uri": "file:///terminationBySuggestion.lean"},
"range":
{"start": {"line": 24, "character": 5}, "end": {"line": 24, "character": 5}},
"context": {"diagnostics": []}}
[{"title": "Try this: termination_by n",
"kind": "quickfix",
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 24, "character": 0},
"end": {"line": 24, "character": 15}},
"newText": "termination_by n"}]}]}}]
{"textDocument": {"uri": "file:///terminationBySuggestion.lean"},
"range":
{"start": {"line": 31, "character": 5}, "end": {"line": 31, "character": 5}},
"context": {"diagnostics": []}}
[{"title": "Try this: termination_by x1 => x1",
"kind": "quickfix",
"edit":
{"documentChanges":
[{"textDocument":
{"version": 1, "uri": "file:///terminationBySuggestion.lean"},
"edits":
[{"range":
{"start": {"line": 31, "character": 0},
"end": {"line": 31, "character": 15}},
"newText": "termination_by x1 => x1"}]}]}}]