mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 11:20:07 -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
42
runtime/queries/julia/injections.scm
Normal file
42
runtime/queries/julia/injections.scm
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
; Inject markdown in docstrings
|
||||
((string_literal
|
||||
(content) @injection.content)
|
||||
.
|
||||
[
|
||||
(module_definition)
|
||||
(abstract_definition)
|
||||
(struct_definition)
|
||||
(function_definition)
|
||||
(macro_definition)
|
||||
(assignment)
|
||||
(const_statement)
|
||||
(call_expression)
|
||||
(identifier)
|
||||
]
|
||||
(#set! injection.language "markdown"))
|
||||
|
||||
; Inject comments
|
||||
([
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
; Inject regex in r"..." and r"""...""" (e.g. r"hello\bworld")
|
||||
(prefixed_string_literal
|
||||
prefix: (identifier) @_prefix
|
||||
(content) @injection.content
|
||||
(#eq? @_prefix "r")
|
||||
(#set! injection.language "regex"))
|
||||
|
||||
; Inject markdown in md"..." and md"""...""" (e.g. md"**Bold** and _Italics_")
|
||||
(prefixed_string_literal
|
||||
prefix: (identifier) @_prefix
|
||||
(content) @injection.content
|
||||
(#eq? @_prefix "md")
|
||||
(#set! injection.language "markdown"))
|
||||
|
||||
; Inject bash in `...` and ```...``` (e.g. `git add --help`)
|
||||
(command_literal
|
||||
(content) @injection.content
|
||||
(#set! injection.language "bash"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue