From 2f17dc49b914de7eacf4a5dedf00cac26d14bfd3 Mon Sep 17 00:00:00 2001 From: Robert Kmiec Date: Sun, 8 May 2022 22:46:36 +0200 Subject: [PATCH] Nvim: use iswap --- .config/nvim/after/plugin/iswap.rc.lua | 5 +++++ .config/nvim/after/plugin/treesitter.rc.lua | 22 ++++++++++----------- .config/nvim/init.vim | 7 ++++--- 3 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 .config/nvim/after/plugin/iswap.rc.lua diff --git a/.config/nvim/after/plugin/iswap.rc.lua b/.config/nvim/after/plugin/iswap.rc.lua new file mode 100644 index 0000000..badcc1c --- /dev/null +++ b/.config/nvim/after/plugin/iswap.rc.lua @@ -0,0 +1,5 @@ +require('iswap').setup{} + +local opts = { noremap=true, silent=true } +vim.api.nvim_set_keymap('n', 'ta', 'ISwapWith', opts) +vim.api.nvim_set_keymap('n', 'tn', 'ISwap', opts) diff --git a/.config/nvim/after/plugin/treesitter.rc.lua b/.config/nvim/after/plugin/treesitter.rc.lua index 05b5edd..3e2384f 100644 --- a/.config/nvim/after/plugin/treesitter.rc.lua +++ b/.config/nvim/after/plugin/treesitter.rc.lua @@ -37,17 +37,17 @@ ts.setup { -- colors = {}, -- table of hex strings -- termcolors = {} -- table of colour name strings }, - textobjects = { - swap = { - enable = true, - swap_next = { - ["tan"] = "@parameter.inner", - }, - swap_previous = { - ["tap"] = "@parameter.inner", - }, - }, - }, + --textobjects = { + -- swap = { + -- enable = true, + -- swap_next = { + -- ["tan"] = "@parameter.inner", + -- }, + -- swap_previous = { + -- ["tap"] = "@parameter.inner", + -- }, + -- }, + --}, matchup = { enable = true, -- disable = { "c", "ruby" }, diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 696fb2a..60330a6 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -24,10 +24,11 @@ Plug 'RRethy/vim-illuminate' "Plug 'ms-jpq/coq.thirdparty', {'branch': '3p'} "Plug 'dbeniamine/cheat.sh-vim' -Plug 'puremourning/vimspector' +"Plug 'puremourning/vimspector' "Plug 'vim-test/vim-test' Plug 'lukas-reineke/indent-blankline.nvim' Plug 'liuchengxu/vista.vim' +Plug 'ggandor/leap.nvim' Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} Plug 'nvim-treesitter/playground' @@ -38,6 +39,7 @@ Plug 'romgrk/nvim-treesitter-context' Plug 'cdelledonne/vim-cmake' Plug 'andymass/vim-matchup' +Plug 'folke/which-key.nvim' " }}} " Completion {{{ @@ -114,11 +116,10 @@ Plug 'marko-cerovac/material.nvim' " Testing phase {{{ Plug 'nvim-neorg/neorg' Plug 'jubnzv/virtual-types.nvim' -Plug 'folke/which-key.nvim' Plug 'https://gitlab.com/yorickpeterse/nvim-window.git' Plug 'themercorp/themer.lua' -Plug 'ggandor/leap.nvim' Plug 'mfussenegger/nvim-dap' +Plug 'mizlan/iswap.nvim' " }}} call plug#end()