abeldekat
abeldekat
Thanks for the feedback! > Are you experiencing any measurable latency when using the default grapple.nvim statusline... Not on my fast laptop. Although scopes are cached, in order to generate...
That's great! I will propose a PR, hopefully this week.
@cbochs, FYI, I started working on the PR. Hope to send a first draft soon.
You're welcome! I had a lot of fun working on this PR...) > ... the uncached result is still negligible compared to the polling rate of 1000ms in lualine I...
> Or, do you just mean that lualine doesn't always immediately reflect the current state of grapple (i.e. add a tag, but it doesn't show up right away)? The latter...
It works when using `schedule_wrap` for `GrappleUpdate` (mini.statusline) ```lua function Statusline:subscribe_to_events() vim.api.nvim_create_autocmd({ "BufEnter" }, { group = STATUSLINE_GROUP, pattern = "*", callback = function() self:update() end, }) vim.api.nvim_create_autocmd({ "User" },...
When changing buffers the statusline needs to be updated: State 1: `1 [2] 3` `vim.cmd.edit("4")` State 2: `1 2 3`
> Grapple.find triggers a GrappleUpdate event Why? I don't expect select or find to create an update event. Update: I would expect the event to happen when calling the api...
That explains. What is your opinion on the current approach, using method `subscribe_to_api` in combination with the BufEnter event?
I added one commit, improving the custom formatter example in the tests