Skip to content

Merge of both the buftype setting, and the assignable preprocessor function.#22

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

Merge of both the buftype setting, and the assignable preprocessor function.#22
coreyb-git wants to merge 14 commits intoravibrock:mainfrom
coreyb-git:main

Conversation

@coreyb-git
Copy link
Copy Markdown
Contributor

Settings to only perform SpellWarn diagnostics on specified buffer types, defaulting to "" only.

Added ability to preprocess the diagnostics table before it is set with vim.diagnostic.set().

Note: This should be the most up-to-date version of both prior, closed, PR's.

@coreyb-git coreyb-git changed the title Merge of both the buftype setting, and the assignable opts.func_preprocessor Merge of both the buftype setting, and the assignable preprocessor function. Mar 10, 2026
@coreyb-git
Copy link
Copy Markdown
Contributor Author

coreyb-git commented Mar 10, 2026

Be aware of a breaking change where prefix and suffix values are added to the severity options.

@ravibrock
Copy link
Copy Markdown
Owner

ravibrock commented Mar 20, 2026

@coreyb-git thanks for the detailed PR, and sorry for taking a while to review it. Feedback/questions below:

  • Is the text changed flag really beneficial? It seems that if someone only wants diagnostics to update on TextChanged, TextChangedI they should set the autocmd update set to that in the config table.
  • Did you mean to leave the TODO comment on line 23 of spelling.lua?
  • I'll do my own testing before merging, but just to double-check, have you ran this branch and validated it yourself?

I think that's all for now, thanks again!

@coreyb-git
Copy link
Copy Markdown
Contributor Author

  • The flag is absolutely necessary, because I am running this ONLY on CursorHold. This means it tries to run every single time I stop navigating, regardless of whether a change has been made or not. As I'm writing in incredibly large files with non-stardard words, this triggers an update through a lot of spelling issues. In short, despite running this on an extremely capable system, this causes noticeable lag in files with a lot of specialized words. So while it doesn't benefit TextChanged and TextChangedI events, it absolutely benefits CursorHold events.
  • I did mean to leave that TODO as I'm not sure if that block is necessary, but haven't gotten around to investigating further.
  • I'm literally running this code all day every day, which is why I've been making these updates to fix the issues I encounter.

Let me know what you think, and if there's any bugs.

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.

3 participants