Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tree sitter provider to updated fork with many added languages #3133

Open
madhat2r opened this issue Feb 4, 2025 · 7 comments
Open
Labels
enhancement New feature or request priority

Comments

@madhat2r
Copy link

madhat2r commented Feb 4, 2025

Currently aider uses grantjenks/py-tree-sitter-languages but there is a maintained fork Goldziher/tree-sitter-language-pack which contains many more languages which would improve aider's language support.

@nktl
Copy link

nktl commented Feb 5, 2025

This would be an amazing improvement, right now the limited number of supported languages is quite constraining, we could really use e.g. powershell or matlab support (which seems to be in the fork).

@paul-gauthier paul-gauthier added enhancement New feature or request priority labels Feb 10, 2025
@paul-gauthier
Copy link
Collaborator

Thanks for trying aider and filing this issue.

There is now experimental support for tree-sitter-language-pack. To use it with aider:

aider --install-main-branch
aider --install-tree-sitter-language-pack

To back out of this you probably need to un-install and re-install.

This doesn't offer any new language support yet. I am trying to assess if folks have any problems installing this package, etc. Next steps will be do enable many more languages.

I would appreciate feedback in both directions: let me know if this works or does not work for you.

See also this issue: Aider-AI/grep-ast#7

@nktl
Copy link

nktl commented Feb 11, 2025

Thank you, this worked (RHEL8 + Aider deployed via conda env):

$ aider --install-main-branch
Install the development version of aider from the main branch?
python -m pip install --upgrade --upgrade-strategy only-if-needed git+https://github.com/Aider-AI/aider.git
Run pip install? (Y)es/(N)o [Yes]: y
python -m pip install --upgrade --upgrade-strategy only-if-needed git+https://github.com/Aider-AI/aider.git
Installation complete.

$ aider --install-tree-sitter-language-pack
Install tree_sitter_language_pack?
python -m pip install --upgrade --upgrade-strategy only-if-needed tree-sitter-language-pack==0.4.0 tree-sitter==0.24.0
Run pip install? (Y)es/(N)o [Yes]: y
python -m pip install --upgrade --upgrade-strategy only-if-needed tree-sitter-language-pack==0.4.0 tree-sitter==0.24.0
Installation complete.

$ pip list | grep tree
tree-sitter                        0.24.0
tree-sitter-c-sharp                0.23.1
tree-sitter-embedded-template      0.23.2
tree-sitter-language-pack          0.4.0
tree-sitter-languages              1.10.2
tree-sitter-yaml                   0.7.0

@madhat2r
Copy link
Author

Worked for me, thanks.

~
❯ aider --install-main-branch
Install the development version of aider from the main branch?

/Users/micah/.pyenv/versions/3.11.3/bin/python -m pip install --upgrade --upgrade-strategy only-if-needed git+https://github.com/Aider-AI/aider.git
Run pip install? (Y)es/(N)o [Yes]:

Installing: /Users/micah/.pyenv/versions/3.11.3/bin/python -m pip install --upgrade --upgrade-strategy only-if-needed git+https://github.com/Aider-AI/aider.git

Installation complete.

~
❯ aider --install-tree-sitter-language-pack
Install tree_sitter_language_pack?

/Users/micah/.pyenv/versions/3.11.3/bin/python -m pip install --upgrade --upgrade-strategy only-if-needed tree-sitter-language-pack==0.4.0 tree-sitter==0.24.0
Run pip install? (Y)es/(N)o [Yes]:

Installing: /Users/micah/.pyenv/versions/3.11.3/bin/python -m pip install --upgrade --upgrade-strategy only-if-needed tree-sitter-language-pack==0.4.0 tree-sitter==0.24.0

Installation complete.


~ took 4s
❯ pip list | grep tree
tree-sitter                   0.24.0
tree-sitter-c-sharp           0.23.1
tree-sitter-embedded-template 0.23.2
tree-sitter-language-pack     0.4.0
tree-sitter-languages         1.10.2
tree-sitter-yaml              0.7.0

@fmos
Copy link

fmos commented Feb 11, 2025

Worked for me as well (openSUSE Tumbleweed within WSL 2).

@bbatsell
Copy link

All good for me on macOS 15.3.1, python 3.12.7, using pipx environment.

> pipx runpip aider-chat list | grep tree
tree-sitter                   0.24.0
tree-sitter-c-sharp           0.23.1
tree-sitter-embedded-template 0.23.2
tree-sitter-language-pack     0.4.0
tree-sitter-languages         1.10.2
tree-sitter-yaml              0.7.0

@jhagege
Copy link

jhagege commented Feb 17, 2025

Hi thanks for the improvement! Seems to work well, any chance to see those dependencies installed by default in aider?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority
Projects
None yet
Development

No branches or pull requests

6 participants