mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 02:40:09 -04:00
fix(julia): fix incorrect documentation query
This patch fixes an inprecise `@string.documentation` query introduced in https://github.com/nvim-treesitter/nvim-treesitter/pull/7391. Specifically, the pattern `(string_literal) . (identifier)` matches also for example `"hello"` in ```julia foo("hello", world) @info "hello" world ``` To fix this, this patch limits the pattern to top-level statements.
This commit is contained in:
parent
3edea87978
commit
b0fc560c75
1 changed files with 5 additions and 1 deletions
|
|
@ -357,9 +357,13 @@
|
||||||
(module_definition)
|
(module_definition)
|
||||||
(struct_definition)
|
(struct_definition)
|
||||||
(call_expression)
|
(call_expression)
|
||||||
(identifier)
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
(source_file
|
||||||
|
(string_literal) @string.documentation
|
||||||
|
.
|
||||||
|
(identifier))
|
||||||
|
|
||||||
[
|
[
|
||||||
(line_comment)
|
(line_comment)
|
||||||
(block_comment)
|
(block_comment)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue