nvim-treesitter/runtime/queries/apex/injections.scm
imawaki 738d9ced4c
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.
2025-10-26 19:07:19 +01:00

14 lines
400 B
Scheme

([
(line_comment)
(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"))