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

Add ability to auto-install language grammars #8

Closed justinbarclay closed 1 year ago

justinbarclay commented 1 year ago

As a follow-up to #7, I've opened up this PR of my work so far for auto-installing grammars based on users' preferences.

To get this to work easily, I expanded treesit-auto to a global minor mode.

This works pretty well for me, as is, but if you want this PR, I am happy to keep tweaking it as you feel necessary 🙂

justinbarclay commented 1 year ago

Thanks so much for getting this started! I think this will be great functionality to have. Now that we're on MELPA I want to make sure we stick to their guidelines as much as possible. I have three small warnings currently:

â›” Warning (comp): treesit-auto.el:162:16: Warning: variable `_success' not left unused  
â›” Warning (comp): treesit-auto.el:161:16: Warning: variable `_grammar-missing' not left unused  
â›” Warning (comp): treesit-auto.el:183:20: Warning: defcustom for `treesit-auto-minor-mode' fails to specify containing group  

I'll have a chance to look/test more thoroughly this afternoon

Cool, good to know that you're using Melpa standard to lint things. These should be addressed now.

justinbarclay commented 1 year ago

Awesome! Thanks for merging this in. 💖

This package is now exactly what I feel the treesit system was missing.