Skip to content

Commit

Permalink
fix(dial-nvim): lazify dial-nvim, add month / weekday crementing (#881)
Browse files Browse the repository at this point in the history
* lazify plugin

* add increment / decrement month / weekday

* fix(dial-nvim): ensure laziness

Co-authored-by: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com>

---------

Co-authored-by: Uzair Aftab <48220549+Uzaaft@users.noreply.github.com>
  • Loading branch information
Axlefublr and Uzaaft authored Apr 14, 2024
1 parent 53a2ce5 commit da97c99
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions lua/astrocommunity/editing-support/dial-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
return {
"monaqa/dial.nvim",
lazy = true,
keys = {
"<C-a>",
"<C-x>",
"g<C-a>",
"g<C-x>",
{
mode = "v",
"<C-a>",
},
{
mode = "v",
"<C-x>",
},
{
mode = "x",
"g<C-a>",
},
{
mode = "x",
"g<C-x>",
},
},
dependencies = {
{
"AstroNvim/astrocore",
Expand All @@ -14,6 +37,8 @@ return {
function() return require("dial.map").manipulate("decrement", "visual") end,
desc = "Decrement",
},
},
x = {
["g<C-a>"] = {
function() return require("dial.map").manipulate("increment", "gvisual") end,
desc = "Increment",
Expand Down Expand Up @@ -54,6 +79,54 @@ return {
augend.date.alias["%Y/%m/%d"],
augend.constant.alias.bool,
augend.semver.alias.semver,
augend.date.new {
pattern = "%B", -- titlecased month names
default_kind = "day",
},
augend.constant.new {
elements = {
"january",
"february",
"march",
"april",
"may",
"june",
"july",
"august",
"september",
"october",
"november",
"december",
},
word = true,
cyclic = true,
},
augend.constant.new {
elements = {
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
},
word = true,
cyclic = true,
},
augend.constant.new {
elements = {
"monday",
"tuesday",
"wednesday",
"thursday",
"friday",
"saturday",
"sunday",
},
word = true,
cyclic = true,
},
augend.case.new {
types = { "camelCase", "PascalCase", "snake_case", "SCREAMING_SNAKE_CASE" },
},
Expand Down

0 comments on commit da97c99

Please sign in to comment.