Commit graph

10 commits

Author SHA1 Message Date
Marc Huisinga
dc5eb40ca3
feat: 'unsolved goals' & 'goals accomplished' diagnostics (#7366)
This PR adds server-side support for dedicated 'unsolved goals' and
'goals accomplished' diagnostics that will have special support in the
Lean 4 VS Code extension. The special 'unsolved goals' diagnostic is
adapted from the 'unsolved goals' error diagnostic, while the 'goals
accomplished' diagnostic is issued when a `theorem` or `Prop`-typed
`example` has no errors or `sorry`s. The Lean 4 VS Code extension
companion PR is at leanprover/vscode-lean4#585.

Specifically, this PR extends the diagnostics served by the language
server with the following fields:
- `leanTags`: Custom tags that denote the kind of diagnostic that is
being served. As opposed to the `code`, `leanTags` should never be
displayed in the UI. Examples introduced by this PR are a tag to
distinguish 'unsolved goals' errors from other diagnostics, as well as a
tag to distinguish the new 'goals accomplished' diagnostic from other
diagnostics.
- `isSilent`: Whether a diagnostic should not be displayed as a regular
diagnostic in the editor. In VS Code, this means that the diagnostic is
displayed in the InfoView under 'Messages', but that it will not be
displayed under 'All Messages' and that it will also not be displayed
with a squiggly line.

The `isSilent` field is also implemented for `Message` so that silent
diagnostics can be logged in the elaborator. All code paths except for
the language server that display diagnostics to users are adjusted to
filter `Message`s with `isSilent := true`.
2025-03-07 13:50:56 +00:00
Henrik Böving
23e49eb519 perf: add prelude to all Lean modules 2024-02-18 14:55:17 -08:00
Sebastian Ullrich
6169435259 refactor: consolidate MessageData constructors into lazy formatting with infos 2022-12-07 19:16:25 +01:00
Gabriel Ebner
96034d15b6 chore: remove obsolete trace functions 2022-08-15 08:55:25 -07:00
Sebastian Ullrich
1ea2f51552 fix: handle warningAsError at logAt 2022-08-06 09:25:09 -07:00
Mario Carneiro
ea0f177bf2 feat: add unused/deprecation diagnostic tags 2022-08-05 17:45:50 +02:00
Leonardo de Moura
a489bdb107 doc: some doc strings 2022-07-30 21:18:50 -07:00
Leonardo de Moura
d6f0880d11 feat: add option warningAsError 2022-07-26 05:57:54 -07:00
Leonardo de Moura
9102f8cb13 fix: generate sorry warning only if there are no error messages
see #1163
2022-06-01 06:32:05 -07:00
Leonardo de Moura
caa79ca04f refactor: move MonadLog 2022-05-31 16:50:48 -07:00
Renamed from src/Lean/Elab/Log.lean (Browse further)