mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
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.
14 lines
400 B
Scheme
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"))
|