NStefan002 / screenkey.nvim

Screencast your keys in Neovim
MIT License
291 stars 5 forks source link

feat: fire user events #27

Closed nicolas-goudry closed 2 months ago

nicolas-goudry commented 2 months ago

Fixes #26.


As discussed in #26, this PR adds User event autocommands on keypresses and on clear.

New configuration option:

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.

NStefan002 commented 2 months ago

LGTM, thank you!