From c377fc69b5f695eeff36c7e3edb3c88478bf14fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 30 Nov 2023 20:43:42 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20perf(nvim):=20omitted=20dial=20c?= =?UTF-8?q?onfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nvim/lua/plugins/extras/coding/dial.lua | 69 ++++++++++++++----- 1 file changed, 53 insertions(+), 16 deletions(-) diff --git a/.config/nvim/lua/plugins/extras/coding/dial.lua b/.config/nvim/lua/plugins/extras/coding/dial.lua index 82085053..917e7cb3 100644 --- a/.config/nvim/lua/plugins/extras/coding/dial.lua +++ b/.config/nvim/lua/plugins/extras/coding/dial.lua @@ -1,21 +1,58 @@ return { "monaqa/dial.nvim", -- stylua: ignore - keys = { - { "", function() return require("dial.map").inc_normal() end, expr = true, desc = "Increment" }, - { "", function() return require("dial.map").dec_normal() end, expr = true, desc = "Decrement" }, + keys = { + { + "", + function() + require("dial.map").manipulate("increment", "normal") + end, + }, + { + "", + function() + require("dial.map").manipulate("decrement", "normal") + end, + }, + { + "g", + function() + require("dial.map").manipulate("increment", "gnormal") + end, + }, + { + "g", + function() + require("dial.map").manipulate("decrement", "gnormal") + end, + }, + { + "", + function() + require("dial.map").manipulate("increment", "visual") + end, + mode = "v", + }, + { + "", + function() + require("dial.map").manipulate("decrement", "visual") + end, + mode = "v", + }, + { + "g", + function() + require("dial.map").manipulate("increment", "gvisual") + end, + mode = "v", + }, + { + "g", + function() + require("dial.map").manipulate("decrement", "gvisual") + end, + mode = "v", + }, }, - config = function() - 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.constant.new({ elements = { "let", "const" } }), - augend.semver.alias.semver, - }, - }) - end, }