This PR significantly improves the test coverage of the language server, providing at least a single basic test for every request that is used by the client. It also implements infrastructure for testing all of these requests, e.g. the ability to run interactive tests in a project context and refactors the interactive test runner to be more maintainable. Finally, it also fixes a small bug with the recently implemented unknown identifier code actions for auto-implicits (#10442) that was discovered in testing, where the "import all unambiguous unknown identifiers" code action didn't work correctly on auto-implicit identifiers.
155 lines
4.6 KiB
Text
155 lines
4.6 KiB
Text
{"version": 1,
|
||
"uri": "file:///inlayHints.lean",
|
||
"diagnostics":
|
||
[{"source": "Lean 4",
|
||
"severity": 2,
|
||
"range":
|
||
{"start": {"line": 6, "character": 4}, "end": {"line": 6, "character": 5}},
|
||
"message": "declaration uses 'sorry'",
|
||
"fullRange":
|
||
{"start": {"line": 6, "character": 4}, "end": {"line": 6, "character": 5}}},
|
||
{"source": "Lean 4",
|
||
"severity": 2,
|
||
"range":
|
||
{"start": {"line": 9, "character": 8}, "end": {"line": 9, "character": 9}},
|
||
"message": "declaration uses 'sorry'",
|
||
"fullRange":
|
||
{"start": {"line": 9, "character": 8}, "end": {"line": 9, "character": 9}}}]}
|
||
{"textDocument": {"uri": "file:///inlayHints.lean"},
|
||
"range":
|
||
{"start": {"line": 0, "character": 0}, "end": {"line": 14, "character": 2}}}
|
||
[{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nβ : Sort u_2\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 0, "character": 21},
|
||
"end": {"line": 0, "character": 21}},
|
||
"newText": " {β}"}],
|
||
"position": {"line": 0, "character": 21},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {β}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nα : Sort u_1\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 0, "character": 13},
|
||
"end": {"line": 0, "character": 13}},
|
||
"newText": " {α}"}],
|
||
"position": {"line": 0, "character": 13},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {α}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\na : ?m\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 1, "character": 7}, "end": {"line": 1, "character": 7}},
|
||
"newText": " {a}"}],
|
||
"position": {"line": 1, "character": 7},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {a}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nα : Sort u_1\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 3, "character": 13},
|
||
"end": {"line": 3, "character": 13}},
|
||
"newText": " {α}"}],
|
||
"position": {"line": 3, "character": 13},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {α}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nβ : Sort u_2\nγ : Sort u_3\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 4, "character": 5}, "end": {"line": 4, "character": 5}},
|
||
"newText": " {β γ}"}],
|
||
"position": {"line": 4, "character": 5},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {β γ}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nα : Sort u_1\nβ : Sort u_2\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 6, "character": 5}, "end": {"line": 6, "character": 5}},
|
||
"newText": " {α β}"}],
|
||
"position": {"line": 6, "character": 5},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {α β}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nx : ?m\nb : ?m\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 8, "character": 8}, "end": {"line": 8, "character": 8}},
|
||
"newText": " {x b}"}],
|
||
"position": {"line": 8, "character": 8},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {x b}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nα : Sort u_1\nn : Nat\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 9, "character": 9}, "end": {"line": 9, "character": 9}},
|
||
"newText": " {α n}"}],
|
||
"position": {"line": 9, "character": 9},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {α n}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nα : Sort u_1\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 11, "character": 7},
|
||
"end": {"line": 11, "character": 7}},
|
||
"newText": " {α}"}],
|
||
"position": {"line": 11, "character": 7},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {α}",
|
||
"kind": 2},
|
||
{"tooltip":
|
||
{"value":
|
||
"Automatically-inserted implicit parameters:\n```lean\nx : ?m\n```",
|
||
"kind": "markdown"},
|
||
"textEdits":
|
||
[{"range":
|
||
{"start": {"line": 13, "character": 10},
|
||
"end": {"line": 13, "character": 10}},
|
||
"newText": " {x}"}],
|
||
"position": {"line": 13, "character": 10},
|
||
"paddingRight": false,
|
||
"paddingLeft": false,
|
||
"label": " {x}",
|
||
"kind": 2}]
|