From 3dd024dc2cbf5b7097e38c0fceac2690d8353e69 Mon Sep 17 00:00:00 2001 From: Heitor Augusto <44377258+HeitorAugustoLN@users.noreply.github.com> Date: Sat, 25 Oct 2025 17:13:15 -0300 Subject: [PATCH] plugins/showkeys: init --- plugins/by-name/showkeys/default.nix | 13 ++++ .../plugins/by-name/showkeys/default.nix | 59 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 plugins/by-name/showkeys/default.nix create mode 100644 tests/test-sources/plugins/by-name/showkeys/default.nix diff --git a/plugins/by-name/showkeys/default.nix b/plugins/by-name/showkeys/default.nix new file mode 100644 index 00000000..27f3fa0f --- /dev/null +++ b/plugins/by-name/showkeys/default.nix @@ -0,0 +1,13 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "showkeys"; + + maintainers = [ lib.maintainers.HeitorAugustoLN ]; + + settingsExample = { + timeout = 5; + maxkeys = 5; + position = "bottom-center"; + keyformat."" = "Enter"; + }; +} diff --git a/tests/test-sources/plugins/by-name/showkeys/default.nix b/tests/test-sources/plugins/by-name/showkeys/default.nix new file mode 100644 index 00000000..f346e585 --- /dev/null +++ b/tests/test-sources/plugins/by-name/showkeys/default.nix @@ -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 = { + "" = "󰁮 "; + "" = "󰘌"; + "" = "󱁐"; + "" = "󰁝"; + "" = "󰁅"; + "" = "󰁍"; + "" = "󰁔"; + "" = "Page 󰁝"; + "" = "Page 󰁅"; + "" = "Alt"; + "" = "Ctrl"; + }; + }; + }; + }; + + example = { + plugins.showkeys = { + enable = true; + settings = { + maxkeys = 5; + timeout = 5; + position = "bottom-center"; + keyformat."" = "Enter"; + }; + }; + }; +}