mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-01-22 12:18:35 +01:00
Add autopairs plugin to neovim
This commit is contained in:
parent
743c933a9b
commit
6db728529b
20
config/nvim/plugins/autopairs.lua
Normal file
20
config/nvim/plugins/autopairs.lua
Normal file
@ -0,0 +1,20 @@
|
||||
local autopairs = require("nvim-autopairs")
|
||||
|
||||
-- configure autopairs
|
||||
autopairs.setup({
|
||||
check_ts = true, -- enable treesitter
|
||||
ts_config = {
|
||||
lua = { "string" }, -- don't add pairs in lua string treesitter nodes
|
||||
javascript = { "template_string" }, -- don't add pairs in javscript template_string treesitter nodes
|
||||
java = false, -- don't check treesitter on java
|
||||
},
|
||||
})
|
||||
|
||||
-- import nvim-autopairs completion functionality
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
|
||||
-- import nvim-cmp plugin (completions plugin)
|
||||
local cmp = require("cmp")
|
||||
|
||||
-- make autopairs and completion work together
|
||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
@ -190,6 +190,7 @@ in
|
||||
indent-blankline-nvim
|
||||
nvim-treesitter.withAllGrammars
|
||||
lualine-nvim
|
||||
nvim-autopairs
|
||||
nvim-web-devicons
|
||||
nvim-cmp
|
||||
cmp-buffer
|
||||
@ -214,6 +215,7 @@ in
|
||||
${builtins.readFile ../../config/nvim/options.lua}
|
||||
${builtins.readFile ../../config/nvim/keymaps.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/alpha.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/autopairs.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/auto-session.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/cmp.lua}
|
||||
${builtins.readFile ../../config/nvim/plugins/nvim-tree.lua}
|
||||
|
Loading…
Reference in New Issue
Block a user