mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 03:26:52 -04:00
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
This commit is contained in:
parent
833405d5a9
commit
cf0eabc16c
2 changed files with 30 additions and 24 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue