Tree Sitter: Copy some queries out of upstream grammars.

Review Request #14526 — Created July 28, 2025 and updated

Information

Review Board
master

Reviewers

We get most of our queries files from nvim-treesitter, because those
tend to be much higher quality, but that doesn't work for everything. In
some cases, nvim-treesitter uses a different grammar implementation than
tree-sitter-language-pack (for example, there are two different
packages named tree-sitter-scss which are incompatible). In other
cases, we may encounter version issues, or just broken files.

This change makes it so we can get queries for specific languages out of
the grammar implementations used from the update-language-info.py
script. This will update the same lock file as the update-queries.py
script, so we know where each and every third-party query file comes
from.

This also renames the queries lock file from nvim-treesitter.lock to
queries.lock, and simplifies the format so it just lists each file
along with its source git repo URL and commit ID.

The new queries files themselves will be in a separate commit.

Ran the update-queries and update-language-info scripts and saw all the new
queries files and updated lockfile.

Summary ID
Tree Sitter: Copy some queries out of upstream grammars.
We get most of our queries files from `nvim-treesitter`, because those tend to be much higher quality, but that doesn't work for everything. In some cases, `nvim-treesitter` uses a different grammar implementation than `tree-sitter-language-pack` (for example, there are two different packages named `tree-sitter-scss` which are incompatible). In other cases, we may encounter version issues, or just broken files. This change makes it so we can get queries for specific languages out of the grammar implementations used from the update-language-info.py script. This will update the same lock file as the update-queries.py script, so we know where each and every third-party query file comes from. This also renames the queries lock file from `nvim-treesitter.lock` to `queries.lock`, and simplifies the format so it just lists each file along with its source git repo URL and commit ID. Testing Done: Ran the update-queries and update-language-info scripts and saw all the new queries files and updated lockfile.
ed7aec0c84a977ad2410a94776ddc02c01534f38
Checks run (2 succeeded)
flake8 passed.
JSHint passed.