{ tree-sitter, ... }:
{ nvim-treesitter, ... }:
let
treesitterGrammars = tree-sitter.withPlugins
(grammars: with grammars; [
tree-sitter-nix
tree-sitter-lua
tree-sitter-ledger
tree-sitter-yaml
tree-sitter-json
tree-sitter-typescript
tree-sitter-javascript
tree-sitter-rust
tree-sitter-haskell
tree-sitter-bash
]);
nvim-treesitter-with-grammars = nvim-treesitter.overrideAttrs (oldAttrs: {
postPatch = ''
rm -r parser
ln -s ${treesitterGrammars} parser
'';
});
in
{
luaConfig = builtins.readFile ./treesitter.lua;
plugins = [
nvim-treesitter-with-grammars
];
}