From 936e6149de9a2812e41088e3c380d11ba298b970 Mon Sep 17 00:00:00 2001 From: Sanchayan Maity Date: Sun, 17 Oct 2021 13:01:47 +0530 Subject: [PATCH] nvim: plugins: Switch to Comment.nvim from commentary.vim --- nvim/.config/nvim/after/plugin/comment.lua | 19 +++++++++++++++++++ nvim/.config/nvim/lua/plugins.lua | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 nvim/.config/nvim/after/plugin/comment.lua diff --git a/nvim/.config/nvim/after/plugin/comment.lua b/nvim/.config/nvim/after/plugin/comment.lua new file mode 100644 index 0000000..2b118d9 --- /dev/null +++ b/nvim/.config/nvim/after/plugin/comment.lua @@ -0,0 +1,19 @@ +require('Comment').setup{ + padding = true, + ignore = nil, + mappings = { + basic = true, + extra = true, + extended = false, + }, + toggler = { + line = 'gcc', + block = 'gbc', + }, + opleader = { + line = 'gc', + block = 'gb', + }, + pre_hook = nil, + post_hook = nil, +} diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 3afc7cc..828d3ae 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -57,9 +57,9 @@ local init = function () 'kana/vim-textobj-entire', 'idbrii/textobj-word-column.vim', } + use 'numToStr/Comment.nvim' -- Tim pope essentials use { - 'tpope/vim-commentary', 'tpope/vim-repeat', 'tpope/vim-sleuth' }