From a48f6d9a0273101df76eb25d2f5477baa277f935 Mon Sep 17 00:00:00 2001 From: Desloz Date: Mon, 31 Jul 2023 19:11:19 +0200 Subject: [PATCH] fix(syntax): Fix highlight for json labels (#363) Within the Treesitter module, the group `@label.json` was previously using `fg = spec.func` to color JSON labels as functions. However the spec `func` is nested in `spec.syntax.func` not in `spec.func`, which caused incorrect highlighting of JSON labels. By using `syn.func`, which correctly points to `spec.syntax.func`, the issue is now resolved. Co-authored-by: Desloz --- lua/nightfox/group/modules/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nightfox/group/modules/treesitter.lua b/lua/nightfox/group/modules/treesitter.lua index dfe1e6af..1088afae 100644 --- a/lua/nightfox/group/modules/treesitter.lua +++ b/lua/nightfox/group/modules/treesitter.lua @@ -117,7 +117,7 @@ If you want to stay on nvim 0.7, disable the module, or pin to commit 15f3b5837a -- Language specific ------------------------------------------------------- -- json - ["@label.json"] = { fg = spec.func }, -- For labels: label: in C and :label: in Lua. + ["@label.json"] = { fg = syn.func }, -- For labels: label: in C and :label: in Lua. -- lua ["@constructor.lua"] = { fg = spec.fg2 }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.