chore(autopairs): move () completion to autopairs plugin
This commit is contained in:
parent
2f51d0d872
commit
f34fb8cb46
2 changed files with 9 additions and 5 deletions
|
@ -1,7 +1,15 @@
|
||||||
return {
|
return {
|
||||||
'windwp/nvim-autopairs',
|
'windwp/nvim-autopairs',
|
||||||
event = 'InsertEnter',
|
event = 'InsertEnter',
|
||||||
config = true,
|
dependencies = { 'hrsh7th/nvim-cmp' },
|
||||||
|
config = function()
|
||||||
|
require('nvim-autopairs').setup {}
|
||||||
|
-- If you want to automatically add `(` after selecting a function or method
|
||||||
|
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
||||||
|
local cmp = require 'cmp'
|
||||||
|
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
||||||
|
end,
|
||||||
|
|
||||||
-- use opts = {} for passing setup options
|
-- use opts = {} for passing setup options
|
||||||
-- this is equivalent to setup({}) function
|
-- this is equivalent to setup({}) function
|
||||||
--
|
--
|
||||||
|
|
|
@ -36,10 +36,6 @@ return {
|
||||||
local luasnip = require 'luasnip'
|
local luasnip = require 'luasnip'
|
||||||
luasnip.config.setup {}
|
luasnip.config.setup {}
|
||||||
|
|
||||||
-- Insert () after function/method completion
|
|
||||||
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
|
|
||||||
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
|
|
||||||
|
|
||||||
cmp.setup {
|
cmp.setup {
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue