aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSalomon Popp <hi@salomonpopp.me>2025-03-11 08:48:33 +0100
committerGitHub <noreply@github.com>2025-03-11 08:48:33 +0100
commitcf0eabc16cf32d69f7612d0e023ef210d84cdde6 (patch)
tree56676a0665c38c737100d80d4bcfff7b3f283c32 /tests
parentfeat(bibtex): highlight URLs and DOIs (#7725) (diff)
downloadnvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.tar
nvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.tar.gz
nvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.tar.bz2
nvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.tar.lz
nvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.tar.xz
nvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.tar.zst
nvim-treesitter-cf0eabc16cf32d69f7612d0e023ef210d84cdde6.zip
fix(python): don't highlight attribute name as builtin (#7712)
* fix(python): don't highlight attribute name as builtin * fix(python): highlight `@variable.member` correctly for member access context * test: add test * test: expand test * docs: update comment * refactor: change order, remove priority override * style: remove extra newline
Diffstat (limited to 'tests')
-rw-r--r--tests/query/highlights/python/fields.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/query/highlights/python/fields.py b/tests/query/highlights/python/fields.py
index deb280622..cea9eccb7 100644
--- a/tests/query/highlights/python/fields.py
+++ b/tests/query/highlights/python/fields.py
@@ -1,9 +1,14 @@
class Fields:
+ type: str
+# ^^^^ @variable.member
+
def __init__(self, fields: list[int]) -> None:
# ^^^ @type.builtin
# ^^^^ @constant.builtin
self.fields = fields
# ^^^^^^ @variable.member
+ self.type = "foo"
+# ^^^^ @variable.member
self.__dunderfield__ = None
# ^^^^^^^^^^^^^^^ @variable.member
self._FunKyFielD = 0