mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 00:40:06 -04:00
feat(rbs): update rbs parser to support inline rbs style
This commit is contained in:
parent
b50774079a
commit
c38b8ba6b9
2 changed files with 30 additions and 1 deletions
|
|
@ -106,10 +106,18 @@
|
|||
|
||||
(global_name) @variable
|
||||
|
||||
; Generics Keywords
|
||||
[
|
||||
(generics_unchecked)
|
||||
(generics_variance)
|
||||
] @keyword
|
||||
|
||||
; Standard Arguments
|
||||
(parameter
|
||||
(var_name) @variable.parameter)
|
||||
|
||||
(unnamed_parameter) @variable.parameter
|
||||
|
||||
; Keyword Arguments
|
||||
(keyword) @variable.parameter
|
||||
|
||||
|
|
@ -144,6 +152,10 @@
|
|||
"&"
|
||||
"|"
|
||||
"^"
|
||||
"?"
|
||||
(rest_operator)
|
||||
(block_operator)
|
||||
(optional_block_operator)
|
||||
] @operator
|
||||
|
||||
; Punctuation
|
||||
|
|
@ -160,3 +172,20 @@
|
|||
","
|
||||
"."
|
||||
] @punctuation.delimiter
|
||||
|
||||
; RBS Inline prefix (keep comment color)
|
||||
(inline_prefix) @comment
|
||||
|
||||
; RBS Inline syntax
|
||||
(inline_class_annotation) @keyword
|
||||
|
||||
(inline_doc
|
||||
(var_name) @variable.parameter)
|
||||
|
||||
(inline_doc_comment) @comment
|
||||
|
||||
(inline_generic) @keyword
|
||||
|
||||
(inline_override) @keyword
|
||||
|
||||
(inline_skip) @keyword
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue