abougouffa / minemacs

MinEmacs: an Emacs configuration framework for daily use
https://abougouffa.github.io/minemacs/
MIT License
140 stars 17 forks source link

revert(treesit-auto): fix treesit-auto-langs #151

Closed hmanhng closed 7 months ago

hmanhng commented 7 months ago

fix https://github.com/abougouffa/minemacs/issues/140#issuecomment-1882858859

abougouffa commented 7 months ago

Nope, this code was problematic. Emacs won't remap the modes when the grammars are installed. Practically, it will only work on the first session (when grammars aren't installed), and once installed and restarted Emacs, it will raise other problems.

For example, see: https://github.com/renzmann/treesit-auto/blob/07a8f924cd4f020a2eb32b45d8543af9556f355d/treesit-auto.el#L461C30-L461C30

The (treesit-auto--selected-recipes) function (which depends on treesit-auto-langs) is used in several places. Which make any change to treesit-auto-langs affect this.