Documentation
¶
Overview ¶
internal/event/events.go
internal/event/manager.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppReadyData ¶
type AppReadyData struct{}
AppReadyData could contain initial config or state later.
type BufferLoadedData ¶
type BufferLoadedData struct {
FilePath string
}
BufferLoadedData contains info about the loaded buffer.
type BufferModifiedData ¶
type BufferModifiedData struct {
Edit types.EditInfo // Information about the change for incremental parsing
}
BufferModifiedData contains info about buffer changes, including EditInfo.
type BufferSavedData ¶
type BufferSavedData struct {
FilePath string
}
BufferSavedData contains info about the saved buffer.
type CursorMovedData ¶
CursorMovedData contains the new cursor position.
type Event ¶
type Event struct {
Type Type // The kind of event
Data interface{} // Payload carrying event-specific data
}
Event is the structure passed through the event bus.
type Handler ¶
Handler defines the function signature for event subscribers. It returns true if the event was consumed (prevents further processing if needed). For now, we won't use the return value, but it's good practice for future flexibility.
type HighlightCompleteData ¶ added in v0.1.3
type HighlightCompleteData struct{}
HighlightCompleteData is fired by the highlight manager when a background highlighting pass finishes (successfully or with cleared results).
type KeyPressedData ¶
KeyPressedData contains the raw tcell key event.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles event subscriptions and dispatching.
type ThemeChangedData ¶
ThemeChangedData holds theme change event data
type TriggerFuzzyFindData ¶ added in v0.1.3
type TriggerFuzzyFindData struct{}
TriggerFuzzyFindData is empty for now
type Type ¶
type Type int
Type identifies the kind of event.
const ( TypeUnknown Type = iota // Core Editor Events TypeBufferModified // Fired when buffer content changes (insert/delete) TypeBufferLoaded // Fired after a buffer is successfully loaded TypeBufferSaved // Fired after a buffer is successfully saved TypeCursorMoved // Fired when the cursor position changes TypeModeChanged // Fired when editor mode changes (e.g., Normal -> Insert) - Future // Input Events (potentially useful for plugins reacting to raw keys) TypeKeyPressed // Raw key press event forwarded // Application Lifecycle Events TypeAppReady // Fired when the application is fully initialized TypeAppQuit // Fired just before application termination begins TypeThemeChanged // Fired when the theme is changed TypeTriggerFuzzyFind // Fired to open fuzzy finder TypeHighlightComplete // Fired when async syntax highlighting finishes )
Define specific event types.