Add nvim-autopairs plugin for better brackets and indenting

This commit is contained in:
Evie Litherland-Smith 2023-03-07 15:03:52 +00:00
parent e78b5ec766
commit 2a09e9094f
4 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,5 @@
return {
disable_in_macro = true,
disable_in_visualblock = true,
check_ts = true,
}

View file

@ -1,5 +1,6 @@
local cmp = require "cmp"
local luasnip = require "luasnip"
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
require("luasnip.loaders.from_vscode").lazy_load()
@ -73,3 +74,5 @@ cmp.setup.cmdline(":", {
{ name = "cmdline" },
},
})
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())

View file

@ -0,0 +1,9 @@
return {
"windwp/nvim-autopairs",
lazy = true,
dependencies = {
"nvim-treesitter/nvim-treesitter",
"hrsh7th/nvim-cmp",
},
config = function() require("nvim-autopairs").setup(require "config.nvim-autopairs") end,
}