ngi-nix / ngipkgs

Nix packages and services for projects supported through the NGI program
https://ngi-nix.github.io/ngipkgs
MIT License
35 stars 18 forks source link

Enable multiple treesitter grammars in `shell.nix` #139

Open armijnhemel opened 9 months ago

armijnhemel commented 9 months ago

I have trouble figuring out how to enable multiple grammars for treesitter, which I want to use (preferably with a shell.nix as that is what I am comfortable with).

I would appreciate some advise for both a "clean" repository as well as for this one:

https://github.com/armijnhemel/proximity_matcher_webservice/

Background information: https://nlnet.nl/project/AutomatedClearing/

fricklerhandwerk commented 8 months ago

@armijnhemel Please repost your question on the NixOS Discourse, as that may get you the answer more quickly.

armijnhemel commented 8 months ago

@armijnhemel Please repost your question on the NixOS Discourse, as that may get you the answer more quickly.

Thank you, I will do that!

armijnhemel commented 7 months ago

https://discourse.nixos.org/t/need-help-enabling-grammars-in-treesitter-python/39500

No replies yet though ;-)

mightyiam commented 4 months ago

Hey, @armijnhemel. You still need help with this? I'll also try to PM you.

armijnhemel commented 3 months ago

Hey, @armijnhemel. You still need help with this? I'll also try to PM you.

Yes. I sent you a reply a few days ago, which I will quote here:

"The ideal outcome for me wouldn't just be a fix for my particular problem, but also some docs that can for example be shared on the NixOS wiki, or some expressions in nixpkgs."

stepbrobd commented 3 months ago

We've implemented a hacky solution that should unblock you, but it only works with tree-sitter (python binding) < 0.22.0

Here's the link: https://github.com/ngi-nix/nixpkgs/blob/c06e35046b115819be5e6350e5485135605df942/pkgs/development/python-modules/tree-sitter-languages/default.nix

mightyiam commented 3 months ago

Working on this live.

mightyiam commented 3 months ago

https://github.com/NixOS/nixpkgs/pull/320783