nvim: Update dial version and changed key maps
Changed maps to increment on <C-S> (instead of the usual <C-A>) and decrement on the typical <C-X>. This makes it work much better with wezterm leader key (<C-A>) and as far as I can see does not directly clash with any other binds.
This commit is contained in:
parent
d4727a3402
commit
bfbe4c36cd
2 changed files with 64 additions and 12 deletions
|
@ -23,7 +23,7 @@
|
|||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
|
||||
"conform.nvim": { "branch": "master", "commit": "acc7337cfd24ddfa3109bfc8c258c09c88c5c450" },
|
||||
"dial.nvim": { "branch": "master", "commit": "54b503f906bc9e5ab85288414840a1b86d40769f" },
|
||||
"dial.nvim": { "branch": "master", "commit": "ed4d6a5bbd5e479b4c4a3019d148561a2e6c1490" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "71349f24c6e07b39f33600985843c289ca735308" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
|
||||
"flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
return {
|
||||
-- surround things with other things using ys/cs/ds
|
||||
{ "kylechui/nvim-surround", config = true, event = "VeryLazy" },
|
||||
{ "kylechui/nvim-surround", config = true, event = { "CursorHold", "InsertEnter" } },
|
||||
|
||||
-- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
||||
-- extend the ^x / ^a possibilities to dates, hex, alphabets, markdown headers
|
||||
-- REMAPPED TO C-X / C-S for decrement/increment
|
||||
{
|
||||
"monaqa/dial.nvim",
|
||||
version = false,
|
||||
config = function()
|
||||
local augend = require("dial.augend")
|
||||
require("dial.config").augends:register_group({
|
||||
|
@ -12,6 +14,7 @@ return {
|
|||
default = {
|
||||
augend.integer.alias.decimal,
|
||||
augend.integer.alias.hex,
|
||||
augend.hexcolor.new({ case = "lower" }),
|
||||
augend.date.alias["%Y/%m/%d"],
|
||||
augend.date.alias["%Y-%m-%d"],
|
||||
augend.date.alias["%m/%d"],
|
||||
|
@ -19,11 +22,10 @@ return {
|
|||
augend.date.alias["%H:%M"],
|
||||
augend.constant.alias.de_weekday_full,
|
||||
augend.constant.alias.de_weekday,
|
||||
augend.constant.alias.bool,
|
||||
augend.semver.alias.semver,
|
||||
augend.constant.alias.Alpha,
|
||||
augend.constant.alias.alpha,
|
||||
augend.hexcolor.new({ case = "lower" }),
|
||||
augend.constant.alias.bool,
|
||||
augend.constant.new({
|
||||
elements = { "and", "or" },
|
||||
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
|
||||
|
@ -37,14 +39,64 @@ return {
|
|||
},
|
||||
})
|
||||
end,
|
||||
event = "InsertEnter",
|
||||
event = { "CursorHold", "InsertEnter" },
|
||||
keys = {
|
||||
{ "<C-a>", "<Plug>(dial-increment)", mode = "n" },
|
||||
{ "<C-x>", "<Plug>(dial-decrement)", mode = "n" },
|
||||
{ "<C-a>", "<Plug>(dial-increment)", mode = "v" },
|
||||
{ "<C-x>", "<Plug>(dial-increment)", mode = "v" },
|
||||
{ "g<C-a>", "g<Plug>(dial-increment)", mode = "v" },
|
||||
{ "g<C-x>", "g<Plug>(dial-increment)", mode = "v" },
|
||||
{
|
||||
"<C-s>",
|
||||
function()
|
||||
require("dial.map").manipulate("increment", "normal")
|
||||
end,
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"<C-x>",
|
||||
function()
|
||||
require("dial.map").manipulate("decrement", "normal")
|
||||
end,
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"<C-s>",
|
||||
function()
|
||||
require("dial.map").manipulate("increment", "visual")
|
||||
end,
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"<C-x>",
|
||||
function()
|
||||
require("dial.map").manipulate("decrement", "visual")
|
||||
end,
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"g<C-s>",
|
||||
function()
|
||||
require("dial.map").manipulate("increment", "gnormal")
|
||||
end,
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"g<C-x>",
|
||||
function()
|
||||
require("dial.map").manipulate("decrement", "gnormal")
|
||||
end,
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"g<C-s>",
|
||||
function()
|
||||
require("dial.map").manipulate("increment", "gvisual")
|
||||
end,
|
||||
mode = "v",
|
||||
},
|
||||
{
|
||||
"g<C-x>",
|
||||
function()
|
||||
require("dial.map").manipulate("decrement", "gvisual")
|
||||
end,
|
||||
mode = "v",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue