From f67bc6622a9b9bc879b2808164abdbaf99d65d4a Mon Sep 17 00:00:00 2001 From: Emmanuel Briot Date: Tue, 22 Aug 2023 08:23:52 +0200 Subject: [PATCH] Synchronize queries with nvim-treesitter repository --- queries/highlights.scm | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 8842037..a350d31 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -94,11 +94,9 @@ [ "exception" "raise" -] @exception -(comment) @comment -(comment) @spell ;; spell-check comments -(string_literal) @string -(string_literal) @spell ;; spell-check strings +] @exception +(comment) @comment @spell +(string_literal) @string (character_literal) @string (numeric_literal) @number @@ -173,6 +171,24 @@ ; ] @function.spec ;) +((comment) @comment.documentation + . [ + (entry_declaration) + (subprogram_declaration) + (parameter_specification) + ]) + +(compilation_unit + . (comment) @comment.documentation) + +(component_list + (component_declaration) + . (comment) @comment.documentation) + +(enumeration_type_definition + (identifier) + . (comment) @comment.documentation) + ;; Highlight errors in red. This is not very useful in practice, as text will ;; be highlighted as user types, and the error could be elsewhere in the code. ;; This also requires defining :hi @error guifg=Red for instance.