mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-07 07:44:33 +02:00
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
33 lines
858 B
Nix
33 lines
858 B
Nix
{ lib, ... }:
|
|
lib.nixvim.plugins.mkNeovimPlugin {
|
|
name = "peek";
|
|
packPathName = "peek.nvim";
|
|
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, {})
|
|
'';
|
|
};
|
|
}
|