Closed turkeylurkey closed 7 months ago
LSP4IJ should set ERROR instead of INFO when severity doesn't exist to align with the vscode behavior https://github.com/redhat-developer/lsp4ij/blob/1213d4b8bc4b4a2aaf7603a9d507c91712165ed1/src/main/java/com/redhat/devtools/lsp4ij/operations/diagnostics/SeverityMapping.java#L41
Please create a PR for that
@turkeylurkey So would we use this constructor for the Diagnostic instead? And if so, what would we provide for the source
parameter?
public Diagnostic([Range](https://javadoc.io/static/org.eclipse.lsp4j/org.eclipse.lsp4j/0.8.1/org/eclipse/lsp4j/Range.html) range,
java.lang.String message,
[DiagnosticSeverity](https://javadoc.io/static/org.eclipse.lsp4j/org.eclipse.lsp4j/0.8.1/org/eclipse/lsp4j/DiagnosticSeverity.html) severity,
java.lang.String source)
The source
is "A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'." so it could be "Liberty Language Server" or some variation.
[Something more user focused would be "Liberty Analyzer" or "Liberty lint" or "Liberty Configurator."]
The LSP says:
In VS Code it is treated as an error and we see:
In a future version of IntelliJ it may be treated as INFO and so there will be no underline, just hover text:
It may be a good idea to specify Error or Warning to take control of the user experience and not leave it to the client.