From 387e08c52d9752bc839c71119f140ba8435c3d70 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 18 Aug 2023 23:42:39 +0300 Subject: nvim: switch to lazy.nvim revert this as whole, if you miss the good old days --- .config/nvim/lua/plugins/misc.lua | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .config/nvim/lua/plugins/misc.lua (limited to '.config/nvim/lua/plugins/misc.lua') 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 @@ +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" }, '`', '(leap-forward)', "leap forward") + map({ "n", "v" }, '`', '(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", "", require("dial.map").inc_normal(), "dial: increment") + map("n", "", require("dial.map").dec_normal(), "dial: decrement") + map("v", "", require("dial.map").inc_visual(), "dial: visual increment") + map("v", "", 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 + }, +} -- cgit v1.2.3-70-g09d2