X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/e40fee4264d28483903e4e7c8bfa352ae685370e..c46a02525d29b338c3d911933d7d306c532ce24f:/nvim/lua/plugins/coding.lua diff --git a/nvim/lua/plugins/coding.lua b/nvim/lua/plugins/coding.lua index 263071d..c1b1c39 100644 --- a/nvim/lua/plugins/coding.lua +++ b/nvim/lua/plugins/coding.lua @@ -4,6 +4,14 @@ return { { "L3MON4D3/LuaSnip", -- disable luasnip bindings for and + dependencies = { + { + "honza/vim-snippets", + config = function() + require("luasnip.loaders.from_snipmate").lazy_load() + end, + }, + }, keys = function() return {} end, @@ -12,6 +20,7 @@ return { -- auto completion { "hrsh7th/nvim-cmp", + ---@param opts cmp.ConfigSchema opts = function(_, opts) local has_words_before = function() unpack = unpack or table.unpack @@ -50,4 +59,47 @@ return { }) end, }, + + -- auto pairs + { + "echasnovski/mini.pairs", + }, + + -- surround + { + "echasnovski/mini.surround", + keys = { + { "S", "lua MiniSurround.add('visual')", "x" }, + { "yss", "ys_", remap = true }, + }, + opts = { + mappings = { + -- TODO: this is tpope/surround like, but should consider using vim-sandwich mappings + -- see: :h MiniSurround-vim-surround-config + add = "ys", + delete = "ds", + find = "", + find_left = "", + highlight = "", + replace = "cs", + update_n_lines = "", + }, + }, + }, + -- comments + { + "numToStr/Comment.nvim", + opts = { + toggler = { + line = "gcc", + block = "gbb", + }, + mappings = { + basic = true, + extra = true, + }, + }, + }, + { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, + { "echasnovski/mini.comment", enabled = false }, }