feat(ruby): add injection pattern to support rbs-inline style

This commit is contained in:
joker1007 2025-11-13 00:17:16 +09:00
parent 37e1287daa
commit 407b7ac662
No known key found for this signature in database
GPG key ID: 69BAF8CC17ECB7B3
2 changed files with 15 additions and 0 deletions

View file

@ -160,3 +160,6 @@
","
"."
] @punctuation.delimiter
; RBS Inline prefix (keep comment color)
(inline_prefix) @comment

View file

@ -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)