Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid spellchecking the f in an f-string #94

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m-zat
Copy link

@m-zat m-zat commented Dec 27, 2022

Before this commit the spellchecker highlights everything in the following:

f'correct word'
^^^^^^^^^

f'wierd word'
^^^^^^^

By adding the matchgroup directive, the start and end of the region are not considered when spellchecking. The examples become:

f'correct word'

f'weird word'
^^^^^

Before this commit the spellchecker highlights everything in the following:

f'correct word'
^^^^^^^^^

f'wierd word'
^^^^^^^

By adding the `matchgroup` directive, the start and end of the region are not
considered when spellchecking. The examples become:

f'correct word'

f'weird word'
  ^^^^^
wmvanvliet added a commit to wmvanvliet/python-syntax that referenced this pull request Nov 8, 2023
- Add support for "match" statements (vim-python#91)
- Add support for additional exceptions (vim-python#93)
- Correctly spell-check f-strings (vim-python#94)
Copy link

@hupfdule hupfdule left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me.

I tried it and it works like it should.

The change is small enough that no unintended side effects are to be expected.

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.

None yet

2 participants