renzmann / treesit-auto

Automatic installation, usage, and fallback for tree-sitter major modes in Emacs 29
GNU General Public License v3.0
377 stars 29 forks source link

How to *update* language libs? #111

Open garyo opened 3 weeks ago

garyo commented 3 weeks ago

Treesit-auto-install-all will find any languages not yet installed, but I don't think it tracks versions so it can't update languages if their upstream code has been improved. It would be nice to be able to update.

RangHo commented 3 weeks ago

To be honest, I don't think automatic version update is a desired behavior for most people. Since the base Tree-Sitter API is not versioned, new types of nodes might be added and Emacs treesit will scream and self-destruct. (cough typescript cough)

Maybe addressing #99 can partially solve this problem? When you need a new version, simply navigate to user-emacs-directory and delete the .so file you want to update, then new grammar definition should be one treesit-auto-install-all away.