aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Ekre <ekrefredrik@gmail.com>2024-12-05 14:47:34 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-12-05 15:04:15 +0100
commitacada1a685f5decd0f10e1672963bf3425eafa45 (patch)
tree5065aa5680df9fbc29df155806c3f26c6240adac
parentbot(lockfile): update python, starlark, teal (diff)
downloadnvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.tar
nvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.tar.gz
nvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.tar.bz2
nvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.tar.lz
nvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.tar.xz
nvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.tar.zst
nvim-treesitter-acada1a685f5decd0f10e1672963bf3425eafa45.zip
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. The pattern `(string_literal) . (call_expression)` matches also for example `"hello"` in `foo("hello", bar())`. Similarly to https://github.com/nvim-treesitter/nvim-treesitter/pull/7436, this patch limits the pattern to top-level statements.
-rw-r--r--queries/julia/highlights.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/queries/julia/highlights.scm b/queries/julia/highlights.scm
index 876fa72af..9a82c5d41 100644
--- a/queries/julia/highlights.scm
+++ b/queries/julia/highlights.scm
@@ -356,13 +356,15 @@
(macro_definition)
(module_definition)
(struct_definition)
- (call_expression)
])
(source_file
(string_literal) @string.documentation
.
- (identifier))
+ [
+ (identifier)
+ (call_expression)
+ ])
[
(line_comment)