mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 23:45:31 +00:00
dev: rebase on a less personalized neovim flake
This commit is contained in:
commit
9c00808863
70 changed files with 4910 additions and 0 deletions
31
modules/treesitter/context.nix
Normal file
31
modules/treesitter/context.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; let
|
||||
cfg = config.vim.treesitter;
|
||||
in {
|
||||
options.vim.treesitter.context.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "enable function context [nvim-treesitter-context]";
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable && cfg.context.enable) {
|
||||
vim.startPlugins = [
|
||||
"nvim-treesitter-context"
|
||||
];
|
||||
|
||||
vim.luaConfigRC.treesitter-context = nvim.dag.entryAnywhere ''
|
||||
-- Treesitter Context config
|
||||
require'treesitter-context'.setup {
|
||||
enable = true,
|
||||
throttle = true,
|
||||
max_lines = 0
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue