Closed acid-bong closed 3 months ago
I wonder if the reason is that Nix isn't in the recipe list.
A recipe is the only way for treesit-auto to know what to do for a language (in your case, nix). Since this issue is about Nix specifically, there are two options:
(Grammars are already packaged in nixpkgs, so i'm in luck with that, the issue is only about the mode substitution.)
When I'm opening a Rust file (
rust-ts-mode
is built-in,rust-mode
is absent), the substitution works: it loads up the treesitter-based mode (and, if i'm usingpackage.el
instead of Nix, asks to install the grammar). Same with languages where the TS-less mode is available (like Python and C).With Nix files, however, it doesn't work: I install
nix-ts-mode
((use-package nix-ts-mode)
), but it doesn't get loaded, neither whennix-mode
is installed nor when it's not.I wonder if the reason is that Nix isn't in the recipe list.