From 164716ab59e0defe7a603b74d98a1b3ab47af612 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 18 Oct 2021 15:15:51 +0300 Subject: nvim: remove pear tree add lua thing --- .config/nvim/lua/plugin_settings.lua | 25 +++++++++++++++++++++++++ .config/nvim/lua/plugins.lua | 4 ++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index 7806790..2dfbaeb 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua @@ -367,3 +367,28 @@ require("indent_blankline").setup { filetype_exclude = {"dashboard", "help", "ledger", "man"} } -- }}} indent-blankline -- + +-- nvim-autopairs {{{ -- + +require('nvim-autopairs').setup({ + disable_filetype = { "TelescopePrompt" }, +}) + +require("nvim-autopairs.completion.cmp").setup({ + map_cr = true, -- map on insert mode + map_complete = true, -- it will auto insert `(` (map_char) after select function or method item + auto_select = true, -- automatically select the first item + insert = false, -- use insert confirm behavior instead of replace + map_char = { -- modifies the function or method delimiter by filetypes + all = '(', + tex = '{' + } +}) + +local Rule = require('nvim-autopairs.rule') +local npairs = require('nvim-autopairs') + +npairs.add_rule(Rule('%"','%"',"remind")) + + +-- }}} nvim-autopairs -- diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index c9b6a7c..055aa2d 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -44,8 +44,8 @@ return require('packer').startup(function() use 'jpalardy/vim-slime' -- snippets to expand use {'SirVer/ultisnips', 'honza/vim-snippets'} - -- auto pair plugin, people hate these - use 'tmsvg/pear-tree' + -- autopairs for neovim + use 'windwp/nvim-autopairs' -- git diff in the sign column use 'airblade/vim-gitgutter' -- completion preview of floating window -- cgit v1.2.3-70-g09d2