From b22ca8cd677c9c0a09d771b1c946377a892f9862 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 3 Jun 2022 20:15:09 +0200 Subject: [PATCH] More specific function keyword high-lighting I learnt about this group by reading the nvim-treesitter source [1]. [1]: see 'lua/nvim-treesitter/highlight.lua' --- queries/highlights.scm | 5 +++++ test/highlight/keywords.tig | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/queries/highlights.scm b/queries/highlights.scm index 628eea6..6cd4076 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -1,4 +1,9 @@ ; Keywords {{{ +[ + "function" + "primitive" +] @keyword.function + [ "array" (break_expression) diff --git a/test/highlight/keywords.tig b/test/highlight/keywords.tig index 122d91a..5ead351 100644 --- a/test/highlight/keywords.tig +++ b/test/highlight/keywords.tig @@ -5,9 +5,9 @@ let /* <- keyword */ function f() : int = a - /* <- keyword */ + /* <- keyword.function */ primitive g() - /* <- keyword */ + /* <- keyword.function */ import "lib.tih" /* <- keyword */