Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

Desloz
Copy link
Contributor

@Desloz Desloz commented Jul 31, 2023

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

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.
@Desloz
Copy link
Contributor Author

Desloz commented Jul 31, 2023

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
Copy link
Owner

Thanks for the PR LGTM!

@EdenEast EdenEast merged commit a48f6d9 into EdenEast:main Jul 31, 2023
@Desloz Desloz deleted the fix-json-label-highlight branch July 31, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants