mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/peek: init
This commit is contained in:
parent
76a319c5ab
commit
276abde288
2 changed files with 74 additions and 0 deletions
32
plugins/by-name/peek/default.nix
Normal file
32
plugins/by-name/peek/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ lib, ... }:
|
||||
lib.nixvim.plugins.mkNeovimPlugin {
|
||||
name = "peek";
|
||||
packPathName = "peek.nvim";
|
||||
package = "peek-nvim";
|
||||
|
||||
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, {})
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue