mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(ruby): add injection pattern to support rbs-inline style
This commit is contained in:
parent
37e1287daa
commit
407b7ac662
2 changed files with 15 additions and 0 deletions
|
|
@ -160,3 +160,6 @@
|
|||
","
|
||||
"."
|
||||
] @punctuation.delimiter
|
||||
|
||||
; RBS Inline prefix (keep comment color)
|
||||
(inline_prefix) @comment
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#lua-match? @injection.content "^#:")
|
||||
(#set! injection.language "rbs"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#lua-match? @injection.content "^#%s+@rbs")
|
||||
(#set! injection.language "rbs"))
|
||||
|
||||
((comment) @injection.content
|
||||
(#lua-match? @injection.content "^#%s+|")
|
||||
(#set! injection.language "rbs"))
|
||||
|
||||
(heredoc_body
|
||||
(heredoc_content) @injection.content
|
||||
(heredoc_end) @injection.language)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue