mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-02 11:36:54 -04:00
Fix #307: Use and document TSVariable/TSVariableBuiltin in all languages
This commit is contained in:
parent
50991e370b
commit
bcf421b4e7
10 changed files with 39 additions and 8 deletions
|
|
@ -1,6 +1,9 @@
|
|||
;; From tree-sitter-python licensed under MIT License
|
||||
; Copyright (c) 2016 Max Brunsfeld
|
||||
|
||||
; Variables
|
||||
(identifier) @variable
|
||||
|
||||
; Reset highlighing in f-string interpolations
|
||||
(interpolation) @Normal
|
||||
|
||||
|
|
@ -105,8 +108,8 @@
|
|||
|
||||
(none) @constant.builtin
|
||||
[(true) (false)] @boolean
|
||||
((identifier) @constant.builtin
|
||||
(#match? @constant.builtin "self"))
|
||||
((identifier) @variable.builtin
|
||||
(#match? @variable.builtin "self"))
|
||||
|
||||
(integer) @number
|
||||
(float) @float
|
||||
|
|
@ -232,8 +235,8 @@
|
|||
((class_definition
|
||||
body: (block
|
||||
(function_definition
|
||||
parameters: (parameters . (identifier) @constant.builtin))))
|
||||
(#vim-match? @constant.builtin "^(self|obj|cls)$"))
|
||||
parameters: (parameters . (identifier) @variable.builtin))))
|
||||
(#vim-match? @variable.builtin "^(self|obj|cls)$"))
|
||||
|
||||
;; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue