mirror of
https://github.com/pojokcodeid/nvim-lazy.git
synced 2025-06-21 16:39:04 +02:00
fix: remove auto pairs /^>
This commit is contained in:
parent
2af9f21559
commit
d3d7d566da
2 changed files with 10 additions and 9 deletions
|
@ -32,6 +32,7 @@
|
|||
"nvim-autopairs": { "branch": "master", "commit": "2e8a10c5fc0dcaf8296a5f1a7077efcd37065cc8" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
|
||||
"nvim-jdtls": { "branch": "master", "commit": "a5c6f38f8151d7b4f5b32c005a95022fa66f4c9d" },
|
||||
"nvim-lsp-installer": { "branch": "main", "commit": "17e0bfa5f2c8854d1636fcd036dc8284db136baa" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cf3dd4a290084a868fac0e2e876039321d57111c" },
|
||||
"nvim-material-icon": { "branch": "main", "commit": "602088c2682e61cbebd7191de7dc88bfa90c6890" },
|
||||
|
|
|
@ -4,7 +4,7 @@ if not status_ok then
|
|||
return
|
||||
end
|
||||
|
||||
local Rule = require("nvim-autopairs.rule")
|
||||
-- local Rule = require("nvim-autopairs.rule")
|
||||
|
||||
npairs.setup({
|
||||
check_ts = true,
|
||||
|
@ -27,14 +27,14 @@ npairs.setup({
|
|||
},
|
||||
})
|
||||
|
||||
npairs.add_rules({
|
||||
Rule("/", ">"):with_pair(function(opts)
|
||||
local pair = opts.line:sub(opts.col, opts.col + 1)
|
||||
if (vim.bo.filetype == "jsx" or vim.bo.filetype == "tsx") and pair == "/" then
|
||||
return npairs.esc("/>") .. "<esc>i"
|
||||
end
|
||||
end),
|
||||
})
|
||||
-- npairs.add_rules({
|
||||
-- Rule("/", ">"):with_pair(function(opts)
|
||||
-- local pair = opts.line:sub(opts.col, opts.col + 1)
|
||||
-- if (vim.bo.filetype == "jsx" or vim.bo.filetype == "tsx") and pair == "/" then
|
||||
-- return npairs.esc("/>") .. "<esc>i"
|
||||
-- end
|
||||
-- end),
|
||||
-- })
|
||||
-- If you want insert `(` after select function or method item
|
||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
||||
local cmp_status_ok, cmp = pcall(require, "cmp")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue