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

Highlight keyword arguments in python call #10

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

Conversation

wookayin
Copy link
Owner

Add new highlight group 'semshiKeyword'

Fixes #7.

@wookayin wookayin force-pushed the highlight-keyword branch 3 times, most recently from 7caefc4 to 7b922d3 Compare April 20, 2023 20:50
@wookayin
Copy link
Owner Author

wookayin commented Apr 20, 2023

Python 3.6 ~ 3.8:

_ast.keyword does not have attribute lineno and col_offset, despite mentioned in the spec: https://docs.python.org/3.7/library/ast.html#ast.AST

So there will be no semshiKeywordArgument for python < 3.9.

See https://bugs.python.org/issue40141

The highlight group name: semshiKeywordArgument.
(see https://docs.python.org/3/glossary.html#term-argument)

By default the hlgroup is linked to `@parameter.python` to ensure better
compatibility with treesitter.
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.

Highlight explicit keyword arguments
1 participant