2023-09-10 13:30:29 +02:00
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with builtins;
|
|
|
|
{
|
2023-09-17 09:35:10 +02:00
|
|
|
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
2023-09-10 13:30:29 +02:00
|
|
|
{
|
|
|
|
plugin = nvim-treesitter;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf =
|
|
|
|
let
|
|
|
|
parserDir = pkgs.symlinkJoin {
|
|
|
|
name = "tresitter-grammars-all";
|
|
|
|
paths = lib.attrValues (lib.filterAttrs (_: builtins.isAttrs) nvim-treesitter-parsers);
|
|
|
|
};
|
|
|
|
in
|
|
|
|
readFile ./lua/nvim-treesitter.lua + ''
|
|
|
|
vim.opt.runtimepath:append("${parserDir}")
|
|
|
|
|
|
|
|
require'nvim-treesitter.configs'.setup {
|
|
|
|
parser_install_dir = "${parserDir}",
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
dependencies = [
|
|
|
|
{ plugin = nvim-ts-context-commentstring; }
|
|
|
|
];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = nvim-treesitter-textsubjects;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
conf = readFile ./lua/nvim-treesitter-textsubjects.lua;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = nvim-treesitter-context;
|
|
|
|
event = [ "BufReadPost" "BufNewFile" ];
|
|
|
|
opts = { };
|
|
|
|
}
|
|
|
|
{
|
|
|
|
plugin = hmts-nvim;
|
|
|
|
ft = [ "nix" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|