mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-12 05:46:12 +02:00
treesitter: add module for treesitter-refactor (#101)
As treesitter-refactor is a treesitter module we need a way to pass extra configuration options to the treesitter setup. This is done through a `moduleConfig` attrset. This set should not be used outside nixvim.
This commit is contained in:
parent
125ed74a42
commit
1f723e8abd
3 changed files with 136 additions and 1 deletions
|
@ -71,6 +71,12 @@ in
|
|||
default = pkgs.tree-sitter.allGrammars;
|
||||
description = "Grammar packages to install";
|
||||
};
|
||||
|
||||
moduleConfig = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = {};
|
||||
description = "This is the configuration for extra modules. It should not be used directly";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -103,7 +109,7 @@ in
|
|||
ensure_installed = if cfg.nixGrammars then [ ] else cfg.ensureInstalled;
|
||||
ignore_install = cfg.ignoreInstall;
|
||||
parser_install_dir = cfg.parserInstallDir;
|
||||
};
|
||||
} // cfg.moduleConfig;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
extraConfigLua = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue