From acada1a685f5decd0f10e1672963bf3425eafa45 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 5 Dec 2024 14:47:34 +0100 Subject: 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. --- queries/julia/highlights.scm | 6 ++++-- 1 file 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) -- cgit v1.3.1