I'm on Ubuntu 20.04 LTS and have little time to face a migration to 22.04 and I haven't
found anyone providing a PPA to install tree-sitter on my system. Same might also
be true for many Debian users...

You can build tree-sitter from source by cloning the repo https://github.com/tree-sitter/tree-sitter and running make && make install PREFIX=<installation directory>.

Alternatively, you can grab one of the pre-build releases here: https://github.com/tree-sitter/tree-sitter/releases

After that make sure to export PKG_CONFIG_PATH=<tree-sitter install dir>/lib/pkgconfig.

Once that is done, emacs should build with tree-sitter smoothly.

--
João Paulo L. de Carvalho
Ph.D Computer Science |  IC-UNICAMP | Campinas , SP - Brazil
Postdoctoral Research Fellow | University of Alberta | Edmonton, AB - Canada
joao.carvalho@ic.unicamp.br
joao.carvalho@ualberta.ca