This repository has been archived on 2024-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/plugins/syntax/default.nix

25 lines
476 B
Nix
Raw Normal View History

{ tree-sitter, grammarFileTypes, ... }:
2022-09-24 17:21:16 +03:00
2022-09-16 23:42:53 +03:00
{ nvim-treesitter, ... }:
2022-09-15 09:57:11 +03:00
2022-09-24 17:21:16 +03:00
let
treesitterGrammars = tree-sitter.withPlugins
(grammars: map (ft: grammars."tree-sitter-${ft}") grammarFileTypes);
2022-09-24 17:21:16 +03:00
nvim-treesitter-with-grammars = nvim-treesitter.overrideAttrs (oldAttrs: {
postPatch = ''
rm -r parser
ln -s ${treesitterGrammars} parser
'';
});
in
2022-09-15 09:57:11 +03:00
{
luaConfig = builtins.readFile ./treesitter.lua;
plugins = [
2022-09-24 17:21:16 +03:00
nvim-treesitter-with-grammars
2022-09-15 09:57:11 +03:00
];
}