1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00
nixvim/plugins/by-name/peek/default.nix
saygo-png c4b27080a6 treewide: infer packPathName menial work
Signed-off-by: saygo-png <saygo.mail@proton.me>
2025-09-27 23:49:59 +00:00

32 lines
828 B
Nix

{ lib, ... }:
lib.nixvim.plugins.mkNeovimPlugin {
name = "peek";
package = "peek-nvim";
description = "Markdown preview plugin for Neovim.";
maintainers = [ lib.maintainers.GaetanLepage ];
settingsExample = {
auto_load = false;
close_on_bdelete = false;
app = "google-chrome-stable";
};
extraOptions = {
createUserCommands = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
Whether to create the `PeekOpen` and `PeekClose` user commands.
'';
};
};
extraConfig = cfg: {
plugins.peek.luaConfig.post = lib.mkIf cfg.createUserCommands ''
vim.api.nvim_create_user_command("PeekOpen", require("peek").open, {})
vim.api.nvim_create_user_command("PeekClose", require("peek").close, {})
'';
};
}