mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
lsp: Report error hints
This commit is contained in:
parent
30f0deea34
commit
50db59f2d2
1 changed files with 6 additions and 1 deletions
|
@ -270,9 +270,14 @@ class LanguageServer:
|
|||
})
|
||||
|
||||
def _create_diagnostic(self, text, uri, err):
|
||||
message = err.message
|
||||
|
||||
for hint in err.hints:
|
||||
message += '\nhint: ' + hint
|
||||
|
||||
result = {
|
||||
"range": utils.idxs_to_range(err.start, err.end, text),
|
||||
"message": err.message,
|
||||
"message": message,
|
||||
"severity": DiagnosticSeverity.Warning if isinstance(err, CompileWarning) else DiagnosticSeverity.Error,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue