Skip to content

Fixes: Removed diagnostics reset, added keepjumps. Stylua formatting.#16

Open
coreyb-git wants to merge 6 commits intoravibrock:mainfrom
coreyb-git:main
Open

Fixes: Removed diagnostics reset, added keepjumps. Stylua formatting.#16
coreyb-git wants to merge 6 commits intoravibrock:mainfrom
coreyb-git:main

Conversation

@coreyb-git
Copy link

When signcolumn has an "auto" setting this causes a UI redraw event that resizes the gutter inwards due to there being less icons in the gutter. Next, repopulating the diagnostics causes another UI redraw to resize the gutter back outwards to account for the re-adding of all the spellwarn diagnostics. This is a rapid visual glitch.

Diagnostics doesn't require a reset for NeoVim to automatically remove the entries that are no longer in the newly set diagnostics list of a namespace (at least in NeoVim v12), thus the reset function is unnecessary, and only serves to create visual glitching with every spelling mistake fixed or created when the signcolumn width is "auto".

Corey B added 3 commits February 18, 2026 13:05
…list isn't destroyed.

Fix:  Removed the unnecessary events, leaving just TextChanged and InsertLeave as the sane, calm, events to update on.
@coreyb-git coreyb-git changed the title Fix: Removed unnecessary diagnostics reset. Fixes, and formatting. Feb 19, 2026
@coreyb-git
Copy link
Author

I've now added the "keepjumps" command in the function that updates the list of spelling error locations. Without this your plugin was destroying the vim jumplist each time you move the cursor.

Also, reduced the events to just TextChanged, and InsertLeave, so that the plugin is calmer, instead of firing on every single little thing.

Formatting has been applied across the files, as per conform.nvim and stylua.

@coreyb-git coreyb-git changed the title Fixes, and formatting. Fixes: Removed diagnostics reset, added keepjumps. Stylua formatting. Feb 19, 2026
@ravibrock
Copy link
Owner

Thanks for the PR Corey! Sorry for taking a while to reply–been busy. Hope to review this and get it merged over the weekend.

@coreyb-git
Copy link
Author

No problem. I just noticed that my changes to the events meant there was no initial bootstrapping of the signs, so I've added the BufReadPost trigger to fix that.

…osHold event on the buffer at vim.o.updatetime. Also, forgot to swap-in bufnr at the 2nd instance in the function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants