• 
      

    Tree Sitter: Add custom HTML queries.

    Review Request #14521 — Created July 28, 2025 and updated — Latest diff uploaded

    Information

    Review Board
    master

    Reviewers

    The HTML highlights queries implemented by nvim-treesitter are extremely
    slow, and don't seem to actually buy us anything in the resulting
    output. This change adds custom queries for HTML which are based on the
    upstream queries from the tree-sitter-html implementation, but with
    improved injections for inline CSS and JS within tags.

    • Ran unit tests.
    • Checked syntax highlighting of HTML and verified that everything
      looked good, including injected CSS and JS both in <script> and
      <style> tags, as well as on*="" andstyle=""` attributes.
    • Profiled syntax highlighting of HTML and verified that the performance
      of these queries was better (by 100x) than the nvim-treesitter HTML
      queries.

    Commits

    Files