diff options
| author | nsfisis <nsfisis@gmail.com> | 2022-12-16 09:33:07 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2022-12-16 09:33:07 +0900 |
| commit | 189a160b5d3aa7d4e6e5a191fc973005a4b57544 (patch) | |
| tree | 8be358809f7e2e8b52fd608ea19342aae6bd0ec4 | |
| parent | 69d3ac5fcc239b07ad22272f0c04cd7b08510ced (diff) | |
| download | dotfiles-189a160b5d3aa7d4e6e5a191fc973005a4b57544.tar.gz dotfiles-189a160b5d3aa7d4e6e5a191fc973005a4b57544.tar.zst dotfiles-189a160b5d3aa7d4e6e5a191fc973005a4b57544.zip | |
neovim: migrate from caw.vim to Comment.nvim
| -rw-r--r-- | .config/nvim/lua/plugins.lua | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 5d60987..4d368d0 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -156,26 +156,33 @@ packer.startup(function(use) -- Non-operators {{{3 -- Comment out. use { - 'tyru/caw.vim', + 'numToStr/Comment.nvim', opt = true, keys = { - {'n', 'm//'}, {'x', 'm//'}, - {'n', 'm/w'}, {'x', 'm/w'}, - {'n', 'm/W'}, {'x', 'm/W'}, - {'n', 'm/b'}, {'x', 'm/b'}, + {'n', 'm//'}, + {'n', 'm??'}, + {'n', 'm/'}, {'x', 'm/'}, + {'n', 'm?'}, {'x', 'm?'}, + {'n', 'm/O'}, + {'n', 'm/o'}, + {'n', 'm/A'}, }, - setup = function() - vim.g.caw_no_default_keymappings = true - end, config = function() - vim.keymap.set('n', 'm//', '<Plug>(caw:hatpos:toggle)') - vim.keymap.set('x', 'm//', '<Plug>(caw:hatpos:toggle)') - vim.keymap.set('n', 'm/w', '<Plug>(caw:wrap:comment)') - vim.keymap.set('x', 'm/w', '<Plug>(caw:wrap:comment)') - vim.keymap.set('n', 'm/W', '<Plug>(caw:wrap:uncomment)') - vim.keymap.set('x', 'm/W', '<Plug>(caw:wrap:uncomment)') - vim.keymap.set('n', 'm/b', '<Plug>(caw:box:comment)') - vim.keymap.set('x', 'm/b', '<Plug>(caw:box:comment)') + require('Comment').setup { + toggler = { + line = 'm//', + block = 'm??', + }, + opleader = { + line = 'm/', + block = 'm?', + }, + extra = { + above = 'm/O', + below = 'm/o', + eol = 'm/A', + }, + } end, } -- Align text. |
