mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -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
|
|
@ -1860,7 +1860,7 @@ return {
|
|||
},
|
||||
rbs = {
|
||||
install_info = {
|
||||
revision = 'de893b166476205b09e79cd3689f95831269579a',
|
||||
revision = '5282e2f36d4109f5315c1d9486b5b0c2044622bb',
|
||||
url = 'https://github.com/joker1007/tree-sitter-rbs',
|
||||
},
|
||||
maintainers = { '@joker1007' },
|
||||
|
|
|
|||
|
|
@ -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