Skip to content

Commit a48f6d9

Browse files
DeslozDesloz
and
Desloz
authored
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 <[email protected]>
1 parent 77aa745 commit a48f6d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/nightfox/group/modules/treesitter.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ If you want to stay on nvim 0.7, disable the module, or pin to commit 15f3b5837a
117117
-- Language specific -------------------------------------------------------
118118

119119
-- json
120-
["@label.json"] = { fg = spec.func }, -- For labels: label: in C and :label: in Lua.
120+
["@label.json"] = { fg = syn.func }, -- For labels: label: in C and :label: in Lua.
121121

122122
-- lua
123123
["@constructor.lua"] = { fg = spec.fg2 }, -- For constructor calls and definitions: = { } in Lua, and Java constructors.

0 commit comments

Comments
 (0)