60 lines
1.8 KiB
Lua
60 lines
1.8 KiB
Lua
return {
|
|
-- Align tables and other alignable things
|
|
{
|
|
"junegunn/vim-easy-align",
|
|
event = "InsertEnter",
|
|
keys = {
|
|
{ "ga", "<Plug>(EasyAlign)", mode = "n" },
|
|
{ "ga", "<Plug>(EasyAlign)", mode = "x" },
|
|
},
|
|
},
|
|
-- surround things with other things using ys/cs/ds
|
|
{ "kylechui/nvim-surround", config = true, event = "InsertEnter" },
|
|
|
|
-- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
|
{
|
|
"monaqa/dial.nvim",
|
|
config = function()
|
|
local augend = require("dial.augend")
|
|
require("dial.config").augends:register_group({
|
|
-- default augends used when no group name is specified
|
|
default = {
|
|
augend.integer.alias.decimal,
|
|
augend.integer.alias.hex,
|
|
augend.date.alias["%Y/%m/%d"],
|
|
augend.date.alias["%Y-%m-%d"],
|
|
augend.date.alias["%m/%d"],
|
|
augend.date.alias["%H:%M:%S"],
|
|
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.new({
|
|
elements = { "and", "or" },
|
|
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
|
|
cyclic = true, -- "or" is incremented into "and".
|
|
}),
|
|
augend.constant.new({
|
|
elements = { "&&", "||" },
|
|
word = false,
|
|
cyclic = true,
|
|
}),
|
|
},
|
|
})
|
|
end,
|
|
event = "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" },
|
|
},
|
|
},
|
|
}
|