As discussed in #26, this PR adds User event autocommands on keypresses and on clear.
New configuration option:
disable.events: boolean to opt-out of user events in case performance is impacted (default: false)
There is two separate patterns: ScreenkeyUpdated for keypresses and ScreenkeyCleared on clear. Both patterns are fired only when vim.g.screenkey_statusline_component is enabled and disable.events is false.
Note that I had to change the disable field annotation to be a table literal since the type of events is different than filetypes and buftypes.
Fixes #26.
As discussed in #26, this PR adds
User
event autocommands on keypresses and on clear.New configuration option:
disable.events
: boolean to opt-out of user events in case performance is impacted (default:false
)There is two separate patterns:
ScreenkeyUpdated
for keypresses andScreenkeyCleared
on clear. Both patterns are fired only whenvim.g.screenkey_statusline_component
is enabled anddisable.events
isfalse
.Note that I had to change the
disable
field annotation to be a table literal since the type ofevents
is different thanfiletypes
andbuftypes
.