diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-04-17 21:25:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-17 15:25:54 -0400 |
commit | 5e258d276fef52cc45a17021dc83a95748a0bc7f (patch) | |
tree | 28f7e5d6922f1eb68f8d19bf8164e6cd3e105137 /lua/kickstart/plugins/autopairs.lua | |
parent | 5540527fabc2776cf62b63ef511079b1c8bf5297 (diff) |
Move plugin examples from README to optional plugin files (#831)
* Move autopairs example from README to an optional plugin
* Move neo-tree example from README to an optional plugin
Diffstat (limited to 'lua/kickstart/plugins/autopairs.lua')
-rw-r--r-- | lua/kickstart/plugins/autopairs.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lua/kickstart/plugins/autopairs.lua b/lua/kickstart/plugins/autopairs.lua new file mode 100644 index 0000000..87a7e5f --- /dev/null +++ b/lua/kickstart/plugins/autopairs.lua @@ -0,0 +1,16 @@ +-- autopairs +-- https://github.com/windwp/nvim-autopairs + +return { + 'windwp/nvim-autopairs', + event = 'InsertEnter', + -- Optional dependency + 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, +} |