mirror of
https://github.com/chenasraf/nvim-treesitter.git
synced 2026-05-17 17:38:02 +00:00
feat(apex): javadoc injections (#8232)
Apex codebases commonly use Javadoc-style comments, similar to Java (Apex is Salesforce's object-oriented language). This updates the injection query to capture javadoc nodes instead of the generic comment for better highlighting and parsing accuracy.
This commit is contained in:
@@ -3,3 +3,12 @@
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
((block_comment) @injection.content
|
||||
(#lua-match? @injection.content "/[*][*][%s]")
|
||||
(#set! injection.language "javadoc"))
|
||||
|
||||
; markdown-style javadocs https://openjdk.org/jeps/467
|
||||
((line_comment) @injection.content
|
||||
(#lua-match? @injection.content "^///%s")
|
||||
(#set! injection.language "javadoc"))
|
||||
|
||||
Reference in New Issue
Block a user