2024-12-21 23:34:10 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) mkIf;
|
2024-05-06 18:14:52 -04:00
|
|
|
|
2024-12-21 23:34:10 -05:00
|
|
|
cfg = config.programs.neovim;
|
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
programs.neovim.plugins = [
|
|
|
|
{
|
|
|
|
plugin = pkgs.vimPlugins.nvim-treesitter-context;
|
|
|
|
type = "lua";
|
|
|
|
config =
|
|
|
|
# lua
|
|
|
|
''
|
|
|
|
require('treesitter-context').setup({
|
|
|
|
enable = true,
|
|
|
|
max_lines = 3,
|
|
|
|
min_window_height = 20,
|
|
|
|
});
|
2024-05-06 18:14:52 -04:00
|
|
|
|
2024-12-21 23:34:10 -05:00
|
|
|
vim.cmd.hi('TreesitterContextBottom', 'gui=underline guisp=Grey');
|
|
|
|
'';
|
|
|
|
}
|
2024-05-06 18:14:52 -04:00
|
|
|
|
2024-12-21 23:34:10 -05:00
|
|
|
pkgs.vimPlugins.nvim-treesitter-textobjects
|
|
|
|
|
|
|
|
{
|
|
|
|
plugin = pkgs.vimPlugins.nvim-treesitter.withAllGrammars;
|
|
|
|
type = "lua";
|
|
|
|
config =
|
|
|
|
# lua
|
|
|
|
''
|
|
|
|
require('nvim-treesitter.configs').setup({
|
|
|
|
highlight = { enable = true },
|
|
|
|
indent = { enable = true },
|
|
|
|
});
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# For accurate stack trace
|
|
|
|
_file = ./treesitter.nix;
|
2024-05-06 18:14:52 -04:00
|
|
|
}
|