all repos — dotfiles @ 5425e8c42b8fbef94dc04159b4b8e6cce636c466

my *nix dotfiles

Plugin cleanup, el cheapo autopairs
Anirudh Oppiliappan x@icyphox.sh
Sun, 22 Aug 2021 12:45:17 +0530
commit

5425e8c42b8fbef94dc04159b4b8e6cce636c466

parent

e3a4571f657bd54f9e63954a89718485284fe311

2 files changed, 13 insertions(+), 10 deletions(-)

jump to
M config/nvim/init.luaconfig/nvim/init.lua

@@ -1,15 +1,14 @@

vim.cmd 'packadd paq-nvim' require 'paq-nvim' { - 'jiangmiao/auto-pairs'; - 'airblade/vim-gitgutter'; - { 'vim/vim-colors-plain', url='https://git.peppe.rs' }; + 'tpope/vim-rsi'; 'tpope/vim-surround'; - { 'vim/better-text-objs', url='https://git.peppe.rs' }; 'wellle/targets.vim'; - 'tpope/vim-rsi'; 'neovim/nvim-lspconfig'; + 'airblade/vim-gitgutter'; { 'ms-jpq/coq_nvim', branch='coq' }; { 'ms-jpq/coq.artifacts', branch='artifacts' }; + { 'vim/better-text-objs', url='https://git.peppe.rs' }; + { 'vim/vim-colors-plain', url='https://git.peppe.rs' }; } require('settings')
M config/nvim/lua/maps.luaconfig/nvim/lua/maps.lua

@@ -7,7 +7,7 @@ map('n', '<Space>', '', {})

vim.g.mapleader = ' ' -options = { noremap = true } +local options = { noremap = true, silent = true } map('n', '<leader><esc>', ':nohlsearch<cr>', options) map('n', '<leader>n', ':bnext<cr>', options) map('n', '<leader>p', ':bprev<cr>', options)

@@ -80,11 +80,15 @@ set completeopt=menuone,noinsert,noselect

" Avoid showing message extra message when using completion set shortmess+=c -]], false) --- complete from buffer -vim.api.nvim_exec([[ -inoremap <expr> <Tab> getline('.')[col('.') - 2] =~ '\w' ? "<C-N>" : "<Tab>" ]], false) + + +-- walmart autopairs +vim.api.nvim_set_keymap('i', '{', '{}<esc>i', options) +vim.api.nvim_set_keymap('i', '(', '()<esc>i', options) +vim.api.nvim_set_keymap('i', '[', '[]<esc>i', options) +vim.api.nvim_set_keymap('i', '\'', '\'\'<esc>i', options) +vim.api.nvim_set_keymap('i', '\"', '\"\"<esc>i', options) return M