EdenEast / nightfox.nvim

🦊A highly customizable theme for vim and neovim with support for lsp, treesitter and a variety of plugins.
MIT License
3.08k stars 140 forks source link

fix(syntax): Fix highlight for json labels #363

Closed Desloz closed 1 year ago

Desloz commented 1 year ago

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.

Before commit

json_label_highlight_bad

After commit

json_label_highlight_good

Desloz commented 1 year ago

By the way, for those who wish to address the issue in their configuration temporarily, until the fix is available:

require("nightfox").setup({
  groups = {
    all = {
      ["@label.json"] = { fg = "syntax.func" },
    }
  }
})
EdenEast commented 1 year ago

Thanks for the PR LGTM!