mirror of
https://github.com/cap153/nvim.git
synced 2026-05-10 16:46:14 +08:00
添加对字符相关插件
This commit is contained in:
parent
bbc8152ed9
commit
51ee1aebf5
18 changed files with 200 additions and 162 deletions
22
lua/pack/configs/autopairs.lua
Normal file
22
lua/pack/configs/autopairs.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- === 对字符自动补全另一半 ===
|
||||
if vim.g.vscode then return end
|
||||
|
||||
local P = {
|
||||
name = "nvim-autopairs", -- 仓库名
|
||||
}
|
||||
|
||||
-- 懒加载触发器
|
||||
vim.api.nvim_create_autocmd({
|
||||
"InsertEnter", "CmdlineEnter", -- 补全/命令行
|
||||
}, {
|
||||
callback = function()
|
||||
PackUtils.load(P, function()
|
||||
require('nvim-autopairs').setup({
|
||||
-- 在写markdown时禁用括号补全
|
||||
disable_filetype = { "markdown" },
|
||||
-- can use treesitter to check for a pair.
|
||||
check_ts = true,
|
||||
})
|
||||
end)
|
||||
end
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue