feat: add autopairs plugin
This commit is contained in:
parent
a0d7331f08
commit
9a000ff4e8
2 changed files with 30 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"mini.nvim": { "branch": "main", "commit": "2435d0de00174a45d6b352fefeaa6008ebe9f23b" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "5a812abc65d529ea7673059a348814c21d7f87ff" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "5874cac1b76c97ebb3fc03225bd7215d4e671cd2" },
|
||||
|
|
29
lua/plugins/autopairs.lua
Normal file
29
lua/plugins/autopairs.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
config = true,
|
||||
-- use opts = {} for passing setup options
|
||||
-- this is equivalent to setup({}) function
|
||||
--
|
||||
opts = {
|
||||
check_ts = true,
|
||||
ts_config = {
|
||||
lua = { 'string' }, -- it will not add a pair on that treesitter node
|
||||
javascript = { 'template_string' },
|
||||
java = false, -- don't check treesitter on java
|
||||
},
|
||||
fast_wrap = {
|
||||
map = '<M-e>',
|
||||
chars = { '{', '[', '(', '"', "'" },
|
||||
pattern = [=[[%'%"%>%]%)%}%,]]=],
|
||||
end_key = '$',
|
||||
before_key = 'h',
|
||||
after_key = 'l',
|
||||
cursor_pos_before = true,
|
||||
keys = 'qwertyuiopzxcvbnmasdfghjkl',
|
||||
manual_position = true,
|
||||
highlight = 'Search',
|
||||
highlight_grey = 'Comment',
|
||||
},
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue