Code change:
Describe the bug The Emacs packages for don't successfully load. To Reproduce Run a from the following : After opening Emacs from inside the and running , we get the following: Expected behavior The packages should be properly loaded, and they should offer syntax-highlighting for select languages. Notify maintainers No one has any particular responsibility for this package. But might be interested in this. Metadata Please run and paste the result.
I'm currently using this, but it stills need some work. Languages grammar are downloaded instead of being built (each language should have it's own separate nix package), and I'm not happy about the but if the grammar bins are in directory will put them in the .
I marked this as stale due to inactivity. &rarr;
Unstale
facing the same issue
Same. What's going on with this issue?
So, I've been looking into this a bit and kind of understand what should be done, but haven't been able to create enough code for a working PR yet. So, basically what you want is to build a rust package from here: The result of the build is and this needs to be built as a dependency for so the file is available for it as . I think it should be enough to link whatever file gets compiled from to the if I read the code correctly. Then, the next is to link all the compiled tree-sitter grammars for the emacs package to find, something copied from how the neovim plugin does this: I'm not completely sure where to build all these packages and I'm running out of my personal time to get this working together. What I see in the current state is many packages linking as a dependency, but is just building the emacs package, not using to build whatever is in the directory and linking the resulting library for the lisp libraries. And the grammars are already in the nixpkgs, you just need to link them to a place where the emacs tree-sitter plugin can find them.
Hey all. I'm still working on fixing this due to me needing tree-sitter for my emacs setup and wanting to understand nix more. Here's the work so far: It now compiles the rust module correctly, and uses the linking strategy from for the languages. It still tries to download files from github, so I either don't link the files to the correct location, or I should patch a method to prevent the download process. I think the best solution would be to use the grammars already available in the monorepo the same way as does. My first try with them was with , but some of them won't work together with the emacs library due to licensing issues. And I also got myself to the download problem, but I think this is not due to files not being the pre-compiled ones from github, but again about some linking issues. If somebody wants to try this out and give me feedback, I'm all ears. I will probably spend some Christmas holiday spare time to make the PR happen. It is very close already.
I made a PR and now it works at least on my NixOS laptop. It would still be nice if we could either utilize the grammars already available in nix, or at least we'd be able to compile them in the derivation instead of just downloading the binaries. I'd be happy if you could try this out and see if it works for you.

Related discussion:
text: <ins> [ "tree-sitter-agda", "tree-sitter-bash", "tree-sitter-c", "tree-sitter-c-sharp", "tree-sitter-cpp", "tree-sitter-css", "tree-sitter-elixir", "tree-sitter-elm", "tree-sitter-fluent", "tree-sitter-go", "tree-sitter-haskell", "tree-sitter-hcl", "tree-sitter-html", "tree-sitter-java", "tree-sitter-javascript", "tree-sitter-jsdoc", "tree-sitter-json", "tree-sitter-julia", "tree-sitter-nix", "tree-sitter-ocaml", "tree-sitter-php", "tree-sitter-prisma", "tree-sitter-python", "tree-sitter-ruby", "tree-sitter-rust", "tree-sitter-scala", "tree-sitter-swift", "tree-sitter-typescript", "tree-sitter-verilog", "tree-sitter-zig" ] </ins>