mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
feat(nvim): Replace mini.pairs with autopairs
This commit is contained in:
parent
32713a2b8f
commit
6f3665bf47
3 changed files with 27 additions and 9 deletions
|
|
@ -3,13 +3,14 @@ return {
|
||||||
{ "mfussenegger/nvim-dap" },
|
{ "mfussenegger/nvim-dap" },
|
||||||
{
|
{
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }
|
opts = {},
|
||||||
|
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
||||||
},
|
},
|
||||||
{ "theHamsta/nvim-dap-virtual-text" },
|
{ "theHamsta/nvim-dap-virtual-text", opts = {} },
|
||||||
{
|
{
|
||||||
"mfussenegger/nvim-dap-python",
|
"mfussenegger/nvim-dap-python",
|
||||||
config = function()
|
config = function()
|
||||||
require("dap-python").setup("uv")
|
require("dap-python").setup("uv")
|
||||||
end
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,7 @@ return {
|
||||||
"js0ny/vim-visual-multi-colemak-hnei",
|
"js0ny/vim-visual-multi-colemak-hnei",
|
||||||
-- "mg979/vim-visual-multi",
|
-- "mg979/vim-visual-multi",
|
||||||
},
|
},
|
||||||
{
|
{ import = "plugins.mod.autopairs" },
|
||||||
"echasnovski/mini.pairs",
|
|
||||||
version = false,
|
|
||||||
opts = {},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||||
|
|
|
||||||
21
tools/nvim/lua/plugins/mod/autopairs.lua
Normal file
21
tools/nvim/lua/plugins/mod/autopairs.lua
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
return {
|
||||||
|
"windwp/nvim-autopairs",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
local npairs = require("nvim-autopairs")
|
||||||
|
local Rule = require("nvim-autopairs.rule")
|
||||||
|
|
||||||
|
npairs.setup()
|
||||||
|
npairs.add_rule(Rule("$", "$", "markdown"))
|
||||||
|
npairs.add_rule(Rule("\\(", "\\)", "tex"))
|
||||||
|
npairs.add_rule(Rule("\\[", "\\]", "tex"))
|
||||||
|
|
||||||
|
npairs.add_rules({
|
||||||
|
Rule("%(", "%)", "cmd"):with_pair(function(opts)
|
||||||
|
if vim.fn.getcmdtype() == ":" then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end),
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue