mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04: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:
parent
c53bb10a71
commit
738d9ced4c
1 changed files with 9 additions and 0 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue