Added dial

This commit is contained in:
Natty 2024-02-10 16:46:17 +01:00
parent b0239aac9d
commit f069f1b01a
Signed by: natty
GPG Key ID: BF6CB659ADEE60EC
2 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,5 @@
local dial = require("dial.map")
return {
n = {
["<C-h>"] = {"db", desc = "Ctrl+Backspace to delete a word backwards"},
@ -10,7 +12,15 @@ return {
["<leader><Down>"] = {"<C-W>j", desc = "Go to the window down"},
["K"] = {require("hover").hover, desc = "Show hover.nvim popup"},
["<C-B>"] = {":Telescope buffers<CR>", desc = "Show Telescope for open buffers"},
["<C-P>"] = {":Telescope registers<CR>", desc = "Show Telescope for register paste"}
["<C-P>"] = {":Telescope registers<CR>", desc = "Show Telescope for register paste"},
["<C-A>"] = {dial.manipulate("increment", "normal"), desc = "Increment number"},
["<C-Y>"] = {dial.manipulate("decrement", "normal"), desc = "Decrement number"},
["<C-X>"] = {false, desc = "Decrement number (unused)"}
},
v = {
["<C-A>"] = {dial.manipulate("increment", "visual"), desc = "Increment number"},
["<C-Y>"] = {dial.manipulate("decrement", "visual"), desc = "Decrement number"},
["<C-X>"] = {false, desc = "Decrement number (unused)"}
},
i = {
["\b"] = {"<C-O>db", desc = "Ctrl+Backspace to delete a word backwards"},
@ -18,4 +28,3 @@ return {
["<C-Del>"] = {"<C-O>dw", desc = "Ctrl+Delete to delete a word forwards"}
}
}

View File

@ -373,4 +373,21 @@ return {{
},
})
end,
}, {
"monaqa/dial.nvim",
config = function()
-- Increment and decrement these groups with a keybind
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.date.alias["%Y-%m-%d"],
augend.semver.alias.semver,
augend.misc.alias.markdown_header,
augend.constant.alias.bool
}
})
end
}}