You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, I just wanted to say thanks for making such a great enhanced version of python syntax highlighting for vim. All the work that you guys have done to make this repo is so far ahead of upstream in terms of incorporating more coloring / new language features really shows.
As far as this issue is concerned, the problem is essentially this:
f"this" # Will not be marked
r"this" # Will not be marked
rf"this" # Will not be marked
rf'this' # Will be marked as spelling error
r'this' # Will be marked as a spelling error
f'this' # Will be marked as a spelling error
So I think what is happening is that spell check is being applied against the whole region including the start / end in all cases. However, in the case of the double quote (or triple double quotes) vim recognizes it as a word separation character and so checks "rf" and "this" as separate words. (R,f, rf, all pass). However in the case of a single quote, vim doesn't recognize it as a word separation character so it spellchecks the 'contraction' rf'this.
I think the solution is wall off the start and end of the region with matchgroup
Ref :help matchgroup In a start or end pattern that is highlighted with "matchgroup" the contained items of the region are not used. This can be used to avoid that a contained item matches in the start or end pattern match.
The spellchecker is considering
f'this
inf'this is a f-string
as a potential dictionary word and thereby highlighting it as wrong.The text was updated successfully, but these errors were encountered: