mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/treesitter: add iconsPackage
This commit is contained in:
parent
bc7f4166f4
commit
4acf12c49d
2 changed files with 18 additions and 5 deletions
|
@ -324,6 +324,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
description = "Grammar packages to install";
|
description = "Grammar packages to install";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
iconsPackage = helpers.mkPackageOption {
|
||||||
|
name = "nvim-web-devicons";
|
||||||
|
default = pkgs.vimPlugins.nvim-web-devicons;
|
||||||
|
};
|
||||||
|
|
||||||
# TODO: Implement rawLua support to be passed into extraConfigLua.
|
# TODO: Implement rawLua support to be passed into extraConfigLua.
|
||||||
languageRegister = mkOption {
|
languageRegister = mkOption {
|
||||||
type = with types; attrsOf (coercedTo str toList (listOf str));
|
type = with types; attrsOf (coercedTo str toList (listOf str));
|
||||||
|
@ -411,10 +416,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
extraFiles = mkIf cfg.nixvimInjections { "queries/nix/injections.scm".source = ./injections.scm; };
|
extraFiles = mkIf cfg.nixvimInjections { "queries/nix/injections.scm".source = ./injections.scm; };
|
||||||
|
|
||||||
extraPlugins = mkIf (cfg.package != null) [
|
extraPlugins =
|
||||||
(mkIf cfg.nixGrammars (cfg.package.withPlugins (_: cfg.grammarPackages)))
|
lib.optional (cfg.iconsPackage != null) cfg.iconsPackage
|
||||||
(mkIf (!cfg.nixGrammars) cfg.package)
|
++ lib.optional (cfg.package != null) (
|
||||||
];
|
if cfg.nixGrammars then cfg.package.withPlugins (_: cfg.grammarPackages) else cfg.package
|
||||||
|
);
|
||||||
|
|
||||||
extraPackages = [
|
extraPackages = [
|
||||||
cfg.gccPackage
|
cfg.gccPackage
|
||||||
|
|
|
@ -134,4 +134,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
no-icons = {
|
||||||
|
plugins.treesitter = {
|
||||||
|
enable = true;
|
||||||
|
iconsPackage = null;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue