ravibrock / spellwarn.nvim

Display spelling errors as diagnostics
MIT License
60 stars 1 forks source link

Using `spellwarn:disable-next-line` creates new diagnostic #1

Closed NStefan002 closed 1 month ago

NStefan002 commented 1 month ago

Nice plugin! Just one thing, using spellwarn:disable-next-line creates a diagnostic for that line. So basically I disabled one diagnostic just for another one to pop up. I only use the basic functionality of spell (just z=), so I don't know if there is a way to add spellwarn to the dictionary.

On the other hand spellwarn:disable for disabling spellwarn on entire file works just as respected.

image

ravibrock commented 1 month ago

Hey! I'm glad you like the plugin. That's intended behavior (at least at the moment), since I elected to not change any of Neovim's spelling settings. If you put your cursor onto spellwarn and hit zg it will mark spellwarn as being spelled correctly.

Later today I can look into updating spellwarn to disable diagnostics on lines containing disable-next-line as well.

NStefan002 commented 1 month ago

That's intended behavior (at least at the moment), since I elected to not change any of Neovim's spelling settings.

That's reasonable.

On the other hand spellwarn:disable for disabling spellwarn on entire file works just as respected.

I totally butchered this sentence, ignore it... I meant to say there is an inconsistency between disable-next-line and the other two options, because disable-next-line produces a warning.

Later today I can look into updating spellwarn to disable diagnostics on lines containing disable-next-line as well.

That's exactly what I was going for.

zg it will mark spellwarn as being spelled correctly

Thanks for the tip, btw

ravibrock commented 1 month ago

Added commit ababc71c9e9ab8ff8dfcf8dcc4e9de1c10b0a5fd to not show diagnostics for the word spellwarn.