summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/misc.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/misc.lua')
-rw-r--r--.config/nvim/lua/plugins/misc.lua83
1 files changed, 83 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/misc.lua b/.config/nvim/lua/plugins/misc.lua
new file mode 100644
index 0000000..f99051e
--- /dev/null
+++ b/.config/nvim/lua/plugins/misc.lua
@@ -0,0 +1,83 @@
1return {
2 {
3 "numToStr/Comment.nvim",
4 lazy = false,
5 opts = {},
6 },
7 {
8 "godlygeek/tabular",
9 lazy = false,
10 },
11 {
12 "matze/vim-move"
13 },
14 {
15 "ggandor/leap.nvim",
16 lazy = false,
17 init = function()
18 local map = require("helpers.keys").map
19
20 map({ "n", "v" }, '`', '<Plug>(leap-forward)', "leap forward")
21 map({ "n", "v" }, '<Leader>`', '<Plug>(leap-backward)', "leap backward")
22 end,
23 opts = {
24 case_insensitive = true,
25 substitute_chars = { ['\r'] = '¬' }
26 }
27 },
28 {
29 "wellle/targets.vim"
30 },
31 {
32 "monaqa/dial.nvim",
33 init = function()
34 local augend = require("dial.augend")
35 require("dial.config").augends:register_group {
36 -- default augends used when no group name is specified
37 default = {
38 augend.integer.alias.decimal, -- nonnegative decimal number (0, 1, 2, 3, ...)
39 augend.integer.alias.hex, -- nonnegative hex number (0x01, 0x1a1f, etc.)
40 augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
41 augend.date.alias["%Y-%m-%d"],
42 augend.semver.alias.semver,
43 augend.constant.new {
44 elements = { "and", "or" },
45 word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
46 cyclic = true, -- "or" is incremented into "and".
47 },
48 augend.constant.new {
49 elements = { "&&", "||" },
50 word = false,
51 cyclic = true,
52 },
53 },
54 }
55 local map = require("helpers.keys").map
56 map("n", "<C-a>", require("dial.map").inc_normal(), "dial: increment")
57 map("n", "<C-x>", require("dial.map").dec_normal(), "dial: decrement")
58 map("v", "<C-a>", require("dial.map").inc_visual(), "dial: visual increment")
59 map("v", "<C-x>", require("dial.map").dec_visual(), "dial: visual decrement")
60 end,
61 },
62 {
63 "kylechui/nvim-surround",
64 version = "*", -- Use for stability; omit to use `main` branch for the latest features
65 event = "VeryLazy",
66 config = function()
67 require("nvim-surround").setup({})
68 end
69 },
70 {
71 "windwp/nvim-autopairs",
72 event = "InsertEnter",
73 opts = {
74 disable_filetype = { "TelescopePrompt" },
75 },
76 init = function()
77 local Rule = require('nvim-autopairs.rule')
78 local npairs = require('nvim-autopairs')
79
80 npairs.add_rule(Rule('%"', '%"', "remind"))
81 end
82 },
83}