Esempio n. 1
0
void LanguageServerCluster::OnClearDiagnostics(LSPEvent& event)
{
    event.Skip();
    wxString uri = event.GetLocation().GetUri();
    wxFileName fn(uri);
    IEditor* editor = clGetManager()->FindEditor(fn.GetFullPath());
    if(editor) { editor->DelAllCompilerMarkers(); }
}
Esempio n. 2
0
void LanguageServerCluster::OnSetDiagnostics(LSPEvent& event)
{
    event.Skip();
    wxString uri = event.GetLocation().GetUri();
    wxFileName fn(uri);
    IEditor* editor = clGetManager()->FindEditor(fn.GetFullPath());
    if(editor) {
        editor->DelAllCompilerMarkers();
        for(const LSP::Diagnostic& d : event.GetDiagnostics()) {
            // LSP uses 1 based line numbers
            editor->SetErrorMarker(d.GetRange().GetStart().GetLine(), d.GetMessage());
        }
    }
}