Include gdscript warning name in LSP message.

My initial attempt changed this in the gdscript code, which resulted in
a duplicate warning name in the builtin editor. We should just append
the warning name in the LSP instead.

This uses parens to match what is shown in the builtin editor.

(cherry picked from commit 8dcc39ec91)
This commit is contained in:
Ryan Roden-Corrent 2020-07-14 07:11:16 -04:00 committed by Rémi Verschelde
parent f7b994aef8
commit 4677502d7c
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ void ExtendGDScriptParser::update_diagnostics() {
const GDScriptWarning &warning = E->get();
lsp::Diagnostic diagnostic;
diagnostic.severity = lsp::DiagnosticSeverity::Warning;
diagnostic.message = warning.get_message();
diagnostic.message = "(" + warning.get_name() + "): " + warning.get_message();
diagnostic.source = "gdscript";
diagnostic.code = warning.code;
lsp::Range range;