mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 16:39:00 +02:00
plugins/telescope: add iconsPackage
This commit is contained in:
parent
bcda408e78
commit
56208f9e3f
2 changed files with 20 additions and 1 deletions
|
@ -6,7 +6,12 @@
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
inherit (lib.nixvim) keymaps mkNullOrOption toLuaObject;
|
inherit (lib.nixvim)
|
||||||
|
keymaps
|
||||||
|
mkNullOrOption
|
||||||
|
mkPackageOption
|
||||||
|
toLuaObject
|
||||||
|
;
|
||||||
in
|
in
|
||||||
# TODO:add support for additional filetypes. This requires autocommands!
|
# TODO:add support for additional filetypes. This requires autocommands!
|
||||||
lib.nixvim.neovim-plugin.mkNeovimPlugin config {
|
lib.nixvim.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
@ -85,10 +90,17 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin config {
|
||||||
added to `extraPackages`.
|
added to `extraPackages`.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
iconsPackage = mkPackageOption {
|
||||||
|
name = "nvim-web-devicons";
|
||||||
|
default = pkgs.vimPlugins.nvim-web-devicons;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
callSetup = false;
|
callSetup = false;
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
|
extraPlugins = mkIf (cfg.iconsPackage != null) [ cfg.iconsPackage ];
|
||||||
|
|
||||||
extraConfigVim = mkIf (cfg.highlightTheme != null) ''
|
extraConfigVim = mkIf (cfg.highlightTheme != null) ''
|
||||||
let $BAT_THEME = '${cfg.highlightTheme}'
|
let $BAT_THEME = '${cfg.highlightTheme}'
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -30,4 +30,11 @@
|
||||||
assert(vim.api.nvim_get_runtime_file("data/memes/planets/earth", false)[1], "telescope planets aren't found in runtime")
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue