mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-08 19:46:06 +01:00
plugins/showkeys: init
This commit is contained in:
parent
03c0dabb9a
commit
3dd024dc2c
2 changed files with 72 additions and 0 deletions
13
plugins/by-name/showkeys/default.nix
Normal file
13
plugins/by-name/showkeys/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "showkeys";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
timeout = 5;
|
||||||
|
maxkeys = 5;
|
||||||
|
position = "bottom-center";
|
||||||
|
keyformat."<CR>" = "Enter";
|
||||||
|
};
|
||||||
|
}
|
||||||
59
tests/test-sources/plugins/by-name/showkeys/default.nix
Normal file
59
tests/test-sources/plugins/by-name/showkeys/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.showkeys.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.showkeys = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
winopts = {
|
||||||
|
relative = "editor";
|
||||||
|
style = "minimal";
|
||||||
|
border = "single";
|
||||||
|
height = 1;
|
||||||
|
row = 1;
|
||||||
|
col = 0;
|
||||||
|
zindex = 100;
|
||||||
|
};
|
||||||
|
|
||||||
|
winhl = "FloatBorder:Comment,Normal:Normal";
|
||||||
|
|
||||||
|
timeout = 3;
|
||||||
|
maxkeys = 3;
|
||||||
|
show_count = false;
|
||||||
|
excluded_modes = lib.nixvim.emptyTable;
|
||||||
|
|
||||||
|
position = "bottom-right";
|
||||||
|
|
||||||
|
keyformat = {
|
||||||
|
"<BS>" = " ";
|
||||||
|
"<CR>" = "";
|
||||||
|
"<Space>" = "";
|
||||||
|
"<Up>" = "";
|
||||||
|
"<Down>" = "";
|
||||||
|
"<Left>" = "";
|
||||||
|
"<Right>" = "";
|
||||||
|
"<PageUp>" = "Page ";
|
||||||
|
"<PageDown>" = "Page ";
|
||||||
|
"<M>" = "Alt";
|
||||||
|
"<C>" = "Ctrl";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.showkeys = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
maxkeys = 5;
|
||||||
|
timeout = 5;
|
||||||
|
position = "bottom-center";
|
||||||
|
keyformat."<CR>" = "Enter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue