mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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)
|
||||
(struct_definition)
|
||||
(call_expression)
|
||||
(identifier)
|
||||
])
|
||||
|
||||
(source_file
|
||||
(string_literal) @string.documentation
|
||||
.
|
||||
(identifier))
|
||||
|
||||
[
|
||||
(line_comment)
|
||||
(block_comment)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue