-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document updating component upon user events #179
Comments
hi @gbroques, also please pay attention that default 'lsp-progress' will handle the escaping of '%' char, e.g. double the '%'. these two lines will transfer '%' to '%%'. also see related discuss why I am doing it: linrongbin16/lsp-progress.nvim#98 heirline could have different behavior from lualine. also it's super welcome if you could submit PR to give people a sample, share how you integrate lsp-progress with heirline. |
Thank you for note about the
Sure! I'll consider submitting a PR for that then. Thanks again! :) |
As a beginner new to Neovim autocommands, configuring
heirline.nvim
with a plugin that requires updatin a component upon a user event was a challenge.For example, I created an
LspMessages
component withheirline.nvim
that relies on linrongbin16/lsp-progress.nvim for theprovider
and needs to be updated when theLspProgressStatusUpdated
user event is emitted:The only example of
update
with apattern
in the cookbook is a builtin event for refreshing a cmoponent when the mode changes:The mistake I made was extrapolating the builtin event example for the user event:
The error you get with the above is "Invalid 'event': 'LspProgressStatusUpdated'".
I'm sure those more familiar with autocommands in Neovim wouldn't make this mistake, but for beginners an example for user events might be helpful!
Thank you again.
heirline.nvim
is very cool for building a customized statusline! 😎The text was updated successfully, but these errors were encountered: