summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/misc.lua
blob: fc28ffab67f537255afb25c0a6ee2d77227e2aae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
return {
    {
        "numToStr/Comment.nvim",
        lazy = false,
        opts = {},
    },
    {
        "godlygeek/tabular",
        lazy = false,
    },
    {
        "matze/vim-move"
    },
    {
        "ggandor/leap.nvim",
        lazy = false,
        init = function()
            local map = require("helpers.keys").map

            map({ "n", "v" }, '`', '<Plug>(leap-forward)', "leap forward")
            map({ "n", "v" }, '<Leader>`', '<Plug>(leap-backward)', "leap backward")
        end,
        opts = {
            case_insensitive = true,
            substitute_chars = { ['\r'] = '¬' }
        }
    },
    {
        "wellle/targets.vim"
    },
    {
        "monaqa/dial.nvim",
        init = 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,  -- nonnegative decimal number (0, 1, 2, 3, ...)
                    augend.integer.alias.hex,      -- nonnegative hex number  (0x01, 0x1a1f, etc.)
                    augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.)
                    augend.date.alias["%Y-%m-%d"],
                    augend.semver.alias.semver,
                    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,
                    },
                },
            }
            local map = require("helpers.keys").map
            map("n", "<C-a>", require("dial.map").inc_normal(), "dial: increment")
            map("n", "<C-x>", require("dial.map").dec_normal(), "dial: decrement")
            map("v", "<C-a>", require("dial.map").inc_visual(), "dial: visual increment")
            map("v", "<C-x>", require("dial.map").dec_visual(), "dial: visual decrement")
        end,
    },
    {
        "kylechui/nvim-surround",
        version = "*", -- Use for stability; omit to use `main` branch for the latest features
        event = "VeryLazy",
        config = function()
            require("nvim-surround").setup({})
        end
    },
    {
        "windwp/nvim-autopairs",
        event = "InsertEnter",
        opts = {
            disable_filetype = { "TelescopePrompt" },
        },
        init = function()
            local Rule = require('nvim-autopairs.rule')
            local npairs = require('nvim-autopairs')

            npairs.add_rule(Rule('%"', '%"', "remind"))
        end
    },
    {
        "brenoprata10/nvim-highlight-colors",
        event = { "BufReadPost", "VeryLazy" },
        config = function()
            require('nvim-highlight-colors').setup({})
        end
    }
}