From 19528509e514fb25de9f07e0b976792f4e03643b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 29 Apr 2025 00:48:55 +0200 Subject: [PATCH] plugins/dial: init --- plugins/by-name/dial/default.nix | 12 +++++++++ .../plugins/by-name/dial/default.nix | 25 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 plugins/by-name/dial/default.nix create mode 100644 tests/test-sources/plugins/by-name/dial/default.nix diff --git a/plugins/by-name/dial/default.nix b/plugins/by-name/dial/default.nix new file mode 100644 index 00000000..7f9d7905 --- /dev/null +++ b/plugins/by-name/dial/default.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "dial"; + packPathName = "dial.nvim"; + package = "dial-nvim"; + + maintainers = [ lib.maintainers.GaetanLepage ]; + + # This plugin does not have a conventional setup function + hasSettings = false; + callSetup = false; +} diff --git a/tests/test-sources/plugins/by-name/dial/default.nix b/tests/test-sources/plugins/by-name/dial/default.nix new file mode 100644 index 00000000..f4cfcaca --- /dev/null +++ b/tests/test-sources/plugins/by-name/dial/default.nix @@ -0,0 +1,25 @@ +{ + empty = { + plugins.dial.enable = true; + }; + + example = { + plugins.dial = { + enable = true; + + luaConfig.content = '' + local augend = require("dial.augend") + require("dial.config").augends:register_group({ + default = { + augend.integer.alias.decimal, + augend.integer.alias.hex, + augend.date.alias["%Y/%m/%d"], + augend.constant.alias.bool, + augend.semver.alias.semver, + augend.constant.new({ elements = { "let", "const" } }), + }, + }) + ''; + }; + }; +}