Merge remote-tracking branch 'helix-pull/pull-diagnostics'

This commit is contained in:
Kalle Carlbark 2024-12-27 21:39:29 +01:00
commit 018f64124f
No known key found for this signature in database
4 changed files with 3 additions and 7 deletions

View file

@ -1048,7 +1048,6 @@ impl Application {
let result = self.handle_show_document(params, offset_encoding);
Ok(json!(result))
}
Ok(MethodCall::WorkspaceDiagnosticRefresh) => {
for document in self.editor.documents() {
let language_server = language_server!();

View file

@ -1,7 +1,7 @@
use helix_event::{events, register_event};
use helix_view::document::Mode;
use helix_view::events::{
DiagnosticsDidChange, DocumentDidChange, DocumentDidOpen, SelectionDidChange, DocumentFocusLost,
DiagnosticsDidChange, DocumentDidChange, DocumentDidOpen, DocumentFocusLost, SelectionDidChange,
};
use crate::commands;

View file

@ -4,8 +4,7 @@ use crate::{
document::{
DocumentOpenError, DocumentSavedEventFuture, DocumentSavedEventResult, Mode, SavePoint,
},
events::DocumentDidOpen,
events::DocumentFocusLost,
events::{DocumentDidOpen, DocumentFocusLost},
graphics::{CursorKind, Rect},
handlers::Handlers,
info::Info,

View file

@ -4,9 +4,6 @@ use helix_event::events;
use crate::{Document, DocumentId, Editor, ViewId};
events! {
// DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope }
DocumentDidOpen<'a> { doc: &'a Document}
// DocumentDidChange<'a> { doc: &'a mut Document, view: ViewId, old_text: &'a Rope }
DocumentDidChange<'a> {
doc: &'a mut Document,
view: ViewId,
@ -14,6 +11,7 @@ events! {
changes: &'a ChangeSet,
ghost_transaction: bool
}
DocumentDidOpen<'a> { doc: &'a Document}
SelectionDidChange<'a> { doc: &'a mut Document, view: ViewId }
DiagnosticsDidChange<'a> { editor: &'a mut Editor, doc: DocumentId }
// called **after** a document loses focus (but not when its closed)