From f583fcb676ba2de4510cfe84f2857abb9c6a785b Mon Sep 17 00:00:00 2001 From: eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:33:07 +1100 Subject: [PATCH 1/2] plugins/cord-nvim: init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit plugins/cord-nvim: fix formatting in test plugins/cord-nvim: add myself to maintainers plugins/cord-nvim: added luaName Co-authored-by: Austin Horstman plugins/cord-nvim: added improvements to code Co-authored-by: Austin Horstman plugins/cord-nvim: fix duplicates and formatting plugins/cord-nvim: cleaned up code Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> plugins/cord-nvim: fixed code and cleanup Co-authored-by: Gaétan Lepage <33058747+GaetanLepage@users.noreply.github.com> --- plugins/by-name/cord-nvim/default.nix | 30 +++++++++++++++++ .../plugins/by-name/cord-nvim/default.nix | 32 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 plugins/by-name/cord-nvim/default.nix create mode 100644 tests/test-sources/plugins/by-name/cord-nvim/default.nix diff --git a/plugins/by-name/cord-nvim/default.nix b/plugins/by-name/cord-nvim/default.nix new file mode 100644 index 0000000000..80283f56b3 --- /dev/null +++ b/plugins/by-name/cord-nvim/default.nix @@ -0,0 +1,30 @@ +{ + lib, + ... +}: +let + inherit (lib.nixvim) defaultNullOpts; + inherit (lib) types; +in +lib.nixvim.neovim-plugin.mkNeovimPlugin { + name = "cord-nvim"; + packPathName = "cord.nvim"; + moduleName = "cord"; + package = "cord-nvim"; + maintainers = [ lib.maintainers.eveeifyeve ]; + + settingsOptions = { + usercmds = defaultNullOpts.mkBool false '' + Enables user commands + ''; + + log_level = lib.nixvim.defaultNullOpts.mkLogLevel "error" '' + Log messages at or above this level. + ''; + }; + + settingsExample = { + usercmds = false; + log_level = null; + }; +} diff --git a/tests/test-sources/plugins/by-name/cord-nvim/default.nix b/tests/test-sources/plugins/by-name/cord-nvim/default.nix new file mode 100644 index 0000000000..30c273fb12 --- /dev/null +++ b/tests/test-sources/plugins/by-name/cord-nvim/default.nix @@ -0,0 +1,32 @@ +{ + empty = { + # don't run tests as they try to access the network. + test.runNvim = false; + plugins.cord-nvim.enable = true; + }; + + defaults = { + # don't run tests as they try to access the network. + test.runNvim = true; + plugins.cord-nvim = { + enable = true; + + settings = { + usercmd = false; + log_level = null; + }; + }; + }; + + example = { + # don't run tests as they try to access the network. + test.runNvim = false; + plugins.cord-nvim = { + enable = true; + + settings = { + usercmd = false; + }; + }; + }; +} From a24b527293193b677e536f7f84fde6b1374ca422 Mon Sep 17 00:00:00 2001 From: eveeifyeve <88671402+Eveeifyeve@users.noreply.github.com> Date: Thu, 23 Jan 2025 07:58:42 +1100 Subject: [PATCH 2/2] feat: buttons setting --- plugins/by-name/cord-nvim/default.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/by-name/cord-nvim/default.nix b/plugins/by-name/cord-nvim/default.nix index 80283f56b3..8c3de185d4 100644 --- a/plugins/by-name/cord-nvim/default.nix +++ b/plugins/by-name/cord-nvim/default.nix @@ -1,5 +1,6 @@ { lib, + helpers, ... }: let @@ -21,6 +22,21 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin { log_level = lib.nixvim.defaultNullOpts.mkLogLevel "error" '' Log messages at or above this level. ''; + + buttons = defaultNullOpts.mkListOf ( + with types; + submodule { + options = { + label = helpers.mkNullOrStr ""; + url = helpers.mkNullOrStr ""; + }; + } + ) + [ ] + '' + + ''; + }; settingsExample = {