nvim: plugins: Switch to nvim-various-textobjs

We never really used the comment text object and functionality of the
other two are provided in nvim-various-textobjs.
This commit is contained in:
Sanchayan Maity 2023-03-06 22:35:57 +05:30
parent 20066f99c7
commit c800b66cbf
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3
3 changed files with 9 additions and 14 deletions

View file

@ -0,0 +1,8 @@
require("various-textobjs").setup({ useDefaultKeymaps = false })
vim.keymap.set({"o", "x"}, "ae", function () require("various-textobjs").entireBuffer() end)
vim.keymap.set({"o", "x"}, "ii", function () require("various-textobjs").indentation(true, true) end)
vim.keymap.set({"o", "x"}, "ai", function () require("various-textobjs").indentation(false, true) end)
vim.keymap.set({"o", "x"}, "as", function () require("various-textobjs").subword(false) end)
vim.keymap.set({"o", "x"}, "is", function () require("various-textobjs").subword(true) end)
vim.keymap.set({"o", "x"}, "?" , function () require("various-textobjs").toNextClosingBracket() end)

View file

@ -1,10 +0,0 @@
call textobj#user#map('wordcolumn', {
\ 'word' : {
\ 'select-i' : 'is',
\ 'select-a' : 'as',
\ },
\ 'WORD' : {
\ 'select-i' : 'iS',
\ 'select-a' : 'aS',
\ },
\ })

View file

@ -14,10 +14,7 @@ require "paq" {
'https://gitlab.com/yorickpeterse/nvim-pqf',
'wellle/targets.vim' ,
'tpope/vim-surround' ,
'chaoren/vim-wordmotion' ,
'kana/vim-textobj-user' ,
'idbrii/textobj-word-column.vim' ,
'glts/vim-textobj-comment' ,
'chrisgrieser/nvim-various-textobjs' ,
'numToStr/Comment.nvim' ,
'tpope/vim-repeat' ,
'tpope/vim-sleuth' ,