nvim-treesitter/queries/julia/injections.scm

23 lines
447 B
Scheme
Raw Normal View History

;; Inject markdown in docstrings
2022-11-27 14:12:26 +02:00
((string_literal) @markdown
. [
(module_definition)
(abstract_definition)
(struct_definition)
(function_definition)
(assignment)
(const_declaration)
]
2023-04-21 04:06:20 -04:00
(#lua-match? @markdown "^\"\"\"")
2022-11-27 14:12:26 +02:00
(#offset! @markdown 0 3 0 -3))
[
(line_comment)
(block_comment)
] @comment
2022-11-26 14:27:21 +02:00
((prefixed_string_literal
prefix: (identifier) @_prefix) @regex
(#eq? @_prefix "r")
(#offset! @regex 0 2 0 -1))