plugins/telescope: add iconsPackage

This commit is contained in:
Austin Horstman 2024-08-30 08:09:04 -05:00
parent bcda408e78
commit 56208f9e3f
No known key found for this signature in database
2 changed files with 20 additions and 1 deletions

View file

@ -6,7 +6,12 @@
}:
with lib;
let
inherit (lib.nixvim) keymaps mkNullOrOption toLuaObject;
inherit (lib.nixvim)
keymaps
mkNullOrOption
mkPackageOption
toLuaObject
;
in
# TODO:add support for additional filetypes. This requires autocommands!
lib.nixvim.neovim-plugin.mkNeovimPlugin config {
@ -85,10 +90,17 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin config {
added to `extraPackages`.
'';
};
iconsPackage = mkPackageOption {
name = "nvim-web-devicons";
default = pkgs.vimPlugins.nvim-web-devicons;
};
};
callSetup = false;
extraConfig = cfg: {
extraPlugins = mkIf (cfg.iconsPackage != null) [ cfg.iconsPackage ];
extraConfigVim = mkIf (cfg.highlightTheme != null) ''
let $BAT_THEME = '${cfg.highlightTheme}'
'';

View file

@ -30,4 +30,11 @@
assert(vim.api.nvim_get_runtime_file("data/memes/planets/earth", false)[1], "telescope planets aren't found in runtime")
'';
};
no-packages = {
plugins.telescope = {
enable = true;
iconsPackage = null;
};
};
}