• 
      

    Tree Sitter: Add tree-sitter-less.

    Review Request #14527 — Created July 29, 2025 and updated

    Information

    Review Board
    master

    Reviewers

    This change adds tree-sitter-less as an additional dependency, because
    we selfishly want to have nice highlighting for LESS files. Most of this
    change is infrastructure to add our own layer on top of
    tree-sitter-language-pack, letting us extend the list of supported
    languages and have our own fallbacks for getting language and parser
    objects.

    • Ran unit tests.
    • Ran update-language-info and update-queries scripts to generate the
      new data.
    Summary ID
    Tree Sitter: Add tree-sitter-less.
    This change adds tree-sitter-less as an additional dependency, because we selfishly want to have nice highlighting for LESS files. Most of this change is infrastructure to add our own layer on top of tree-sitter-language-pack, letting us extend the list of supported languages and have our own fallbacks for getting language and parser objects. Testing Done: - Ran unit tests. - Ran update-language-info and update-queries scripts to generate the new data.
    73b06706d29849a4aa903d1e8b4985bd3d7564f2
    Description From Last Updated

    I feel like we should do this programmatically instead of hardcoding and having to remember to add a new if …

    maubin maubin

    This should say parser instead of grammar.

    maubin maubin
    Checks run (2 succeeded)
    flake8 passed.
    JSHint passed.
    maubin
    1. 
        
    2. reviewboard/treesitter/core.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      I feel like we should do this programmatically instead of hardcoding and having to remember to add a new if here anytime we have a new third party grammar. Maybe make THIRD_PARTY_GRAMMARS a dictionary with the python module for the language as the values and then loop through it here?

    3. reviewboard/treesitter/core.py (Diff revision 1)
       
       
      Show all issues

      This should say parser instead of grammar.

    4.