Skip to content

Commit

Permalink
fix(syntax): Fix highlight for json labels (#363)
Browse files Browse the repository at this point in the history
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 <deslozfr@gmail.com>
  • Loading branch information
Desloz and Desloz committed Jul 31, 2023
1 parent 77aa745 commit a48f6d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/nightfox/group/modules/treesitter.lua
Expand Up @@ -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.
Expand Down

0 comments on commit a48f6d9

Please sign in to comment.