mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 21:40:03 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
31
runtime/queries/java/injections.scm
Normal file
31
runtime/queries/java/injections.scm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
([
|
||||
(block_comment)
|
||||
(line_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"))
|
||||
|
||||
((method_invocation
|
||||
name: (identifier) @_method
|
||||
arguments: (argument_list
|
||||
.
|
||||
(string_literal
|
||||
.
|
||||
(_) @injection.content)))
|
||||
(#any-of? @_method "format" "printf")
|
||||
(#set! injection.language "printf"))
|
||||
|
||||
((method_invocation
|
||||
object: (string_literal
|
||||
(string_fragment) @injection.content)
|
||||
name: (identifier) @_method)
|
||||
(#eq? @_method "formatted")
|
||||
(#set! injection.language "printf"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue