Skip to content

Commit

Permalink
feat(dial-nvim): Migrate to new mapping api, and add g<C-x> g<C-a> ma…
Browse files Browse the repository at this point in the history
…ppings (#700)
  • Loading branch information
Uzaaft authored Dec 31, 2023
1 parent 6b8aef2 commit 5ae9eed
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions lua/astrocommunity/editing-support/dial-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,43 +1,57 @@
return {
"monaqa/dial.nvim",
keys = {
-- Visual mode mappings
{
"<C-a>",
mode = { "v" },
function() return require("dial.map").inc_visual() end,
function() return require("dial.map").manipulate("increment", "visual") end,
expr = true,
desc = "Increment",
},
{
"<C-x>",
mode = { "v" },
function() return require("dial.map").dec_visual() end,
function() return require("dial.map").manipulate("decrement", "visual") end,
expr = true,
desc = "Decrement",
},
{
"g<C-a>",
mode = { "v" },
function() return require("dial.map").inc_gvisual() end,
function() return require("dial.map").manipulate("increment", "gvisual") end,
expr = true,
desc = "Increment",
},
{
"g<C-x>",
mode = { "v" },
function() return require("dial.map").dec_gvisual() end,
function() return require("dial.map").manipulate("decrement", "gvisual") end,
expr = true,
desc = "Decrement",
},
-- Normal mode mappings
{
"<C-a>",
function() return require("dial.map").inc_normal() end,
function() return require("dial.map").manipulate("increment", "normal") end,
expr = true,
desc = "Increment",
},
{
"<C-x>",
function() return require("dial.map").dec_normal() end,
function() return require("dial.map").manipulate("decrement", "normal") end,
expr = true,
desc = "Decrement",
},
{
"g<C-a>",
function() return require("dial.map").manipulate("increment", "gnormal") end,
expr = true,
desc = "Increment",
},
{
"g<C-x>",
function() return require("dial.map").manipulate("decrement", "gnormal") end,
expr = true,
desc = "Decrement",
},
Expand Down

1 comment on commit 5ae9eed

@jay-babu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

I keep getting this error when trying to use dial.nvim. i did not see this before this commit

Please sign in to comment.