Open yuzhou721 opened 2 months ago
I imagine this might vary for each grammar. Would the :revision
keyword for a recipe, assuming that your grammar's repo has version number tags, do the trick?
https://genehack.blog/2024/02/fixing-an-emacs-typescript-ts-mode-problem/ Actually, that's exactly what I'm doing now.
(add-to-list 'treesit-auto-recipe-list (make-treesit-auto-recipe
:lang 'go
:ts-mode 'go-ts-mode
:remap 'go-mode
:requires 'gomod
:url "https://github.com/tree-sitter/tree-sitter-go"
:revision "v0.20.0"
:ext "\\.go\\'"))
I'm not sure if there's another way to do it.
Maintaining an association list (alist) for Emacs versions could be a solution to manage different versions of grammar supported by tree-sit. This alist would map Emacs versions to the compatible tree-sit grammar versions, allowing for more precise control over which version is installed and used.
Can the version of the grammar be fixed according to the version of emacs? Because each installation is the latest version, but emacs treesit does not support that version, causing an error:
Or is it possible to set the version simply?