mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat(java): add injections for markdown documentation comments
Since Java 23, java documentation supports markdown. It is supported by a '///' line comment followed by mandatory white space: https://openjdk.org/jeps/467
This commit is contained in:
parent
36bbf51842
commit
cb8e810a1e
1 changed files with 12 additions and 0 deletions
|
|
@ -8,6 +8,18 @@
|
|||
(#lua-match? @injection.content "/[*][!<*][^a-zA-Z]")
|
||||
(#set! injection.language "doxygen"))
|
||||
|
||||
; markdown-style javadocs: https://openjdk.org/jeps/467
|
||||
((line_comment) @injection.content
|
||||
(#lua-match? @injection.content "^///%s")
|
||||
(#offset! @injection.content 0 4 0 0)
|
||||
(#set! injection.language "markdown_inline"))
|
||||
|
||||
; markdown-style javadocs: https://openjdk.org/jeps/467
|
||||
((line_comment) @injection.content
|
||||
(#lua-match? @injection.content "^///%s+[@]")
|
||||
(#offset! @injection.content 0 4 0 0)
|
||||
(#set! injection.language "doxygen"))
|
||||
|
||||
((method_invocation
|
||||
name: (identifier) @_method
|
||||
arguments: (argument_list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue