mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
- #76 update the predicate syntax for ruby and css
This commit is contained in:
parent
85645f5720
commit
37f9866f66
2 changed files with 9 additions and 8 deletions
|
|
@ -48,9 +48,9 @@
|
|||
|
||||
|
||||
((property_name) @type
|
||||
(match? @type "^--"))
|
||||
(#match? @type "^--"))
|
||||
((plain_value) @type
|
||||
(match? @type "^--"))
|
||||
(#match? @type "^--"))
|
||||
|
||||
(string_value) @string
|
||||
(color_value) @string
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@
|
|||
"yield" @keyword
|
||||
|
||||
((identifier) @keyword
|
||||
(match? @keyword "^(private|protected|public)$"))
|
||||
(#match? @keyword "^(private|protected|public)$"))
|
||||
|
||||
; Function calls
|
||||
|
||||
((identifier) @function
|
||||
(eq? @function "require"))
|
||||
(#eq? @function "require"))
|
||||
|
||||
"defined?" @function
|
||||
|
||||
|
|
@ -67,10 +67,10 @@
|
|||
(instance_variable) @label
|
||||
|
||||
((identifier) @constant.builtin
|
||||
(match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
||||
(#match? @constant.builtin "^__(FILE|LINE|ENCODING)__$"))
|
||||
|
||||
((constant) @constant.macro
|
||||
(match? @constant.macro "^[A-Z\\d_]+$"))
|
||||
(#match? @constant.macro "^[A-Z\\d_]+$"))
|
||||
|
||||
(constant) @constant
|
||||
|
||||
|
|
@ -87,8 +87,9 @@
|
|||
(block_parameter (identifier) @parameter)
|
||||
(keyword_parameter (identifier) @parameter)
|
||||
|
||||
((identifier) @function
|
||||
(is-not? local))
|
||||
; TODO: Re-enable this once it is supported
|
||||
; ((identifier) @function
|
||||
; (#is-not? local))
|
||||
|
||||
; Literals
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue