Registry Mirror
Skip to content

Honor #set! priority in queries #14

Open

Description

@SectionTN

nvim-treesitter uses #set! priority to rank overlapping patterns regardless of their order. The highlighter ignores the directive: patterns apply in order and the later one wins. Seven patterns carry it (three in markdown, one each in html, python, yaml and c), so those constructs can color differently from nvim.

The fix is to honor the directive when merging spans, sorting by priority and then by pattern order.

Activity

  1. added
    syntax
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    syntax

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions