nixos-configs/common/home/neovim/treesitter.nix

41 lines
943 B
Nix
Raw Normal View History

{pkgs, ...}: let
inherit (pkgs) vimPlugins;
in {
programs = {
neovim = {
plugins = [
{
plugin = vimPlugins.nvim-treesitter-context;
type = "lua";
config =
2024-06-09 22:49:30 -04:00
# lua
''
require('treesitter-context').setup({
enable = true,
max_lines = 3,
min_window_height = 20,
});
vim.cmd.hi('TreesitterContextBottom', 'gui=underline guisp=Grey');
'';
}
vimPlugins.nvim-treesitter-textobjects
{
2024-05-19 14:02:08 -04:00
plugin = vimPlugins.nvim-treesitter.withAllGrammars;
type = "lua";
config =
2024-06-09 22:49:30 -04:00
# lua
''
require('nvim-treesitter.configs').setup({
highlight = { enable = true },
indent = { enable = true },
});
'';
}
];
};
};
}