-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
i am considering using vscode.language.createDiagnosticCollection API and vscode.languages.registerCodeActionsProvider to collect langium parse and lexer error info ,and show diagnosticInfo in the example1.st file,but langium seems to have implement it like below screenshot? |
Beta Was this translation helpful? Give feedback.
-
Langium sends diagnostics to the client using the LSP push diagnostics mechanism. By default, it will convert all parser and lexer errors into error diagnostics. In addition, you can use the semantic validation API, to perform custom validation based on your AST. The |
Beta Was this translation helpful? Give feedback.
Langium sends diagnostics to the client using the LSP push diagnostics mechanism. By default, it will convert all parser and lexer errors into error diagnostics. In addition, you can use the semantic validation API, to perform custom validation based on your AST.
The
vscode-languageclient
package takes care of using the vscode API to display diagnostics received from the language server connection. No need to implement this yourself.