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:
traxys 2023-01-05 15:23:23 +01:00 committed by GitHub
parent 125ed74a42
commit 1f723e8abd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 136 additions and 1 deletions

View file

@ -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 = ''