Closed LeoLee53 closed 2 months ago
There is a not proper Lua pattern set up for (
character in the config. I can not help more without seeing how 'mini.pairs' is set up.
I used the default setup using
require(“mini.pairs”).setup()
I used the default setup using
require(“mini.pairs”).setup()
It doesn't look like it, because with basic require('mini.pairs').setup()
everything works on all supported Neovim versions.
Would you mind executing the following command which will put some lines at the start of current buffer, copy those lines and paste here?
:lua vim.fn.append(0, vim.split(vim.inspect(MiniPairs.config), '\n'))
sure, here's the config I got through the command:
{
mappings = {
['"'] = {
action = "closeopen",
neigh_pattern = "[^\\].",
pair = '""',
register = {
cr = false
}
},
["'"] = {
action = "closeopen",
neigh_pattern = "[^%a\\].",
pair = "''",
register = {
cr = false
}
},
["("] = {
action = "open",
neigh_pattern = "[^\\].",
pair = "()"
},
[")"] = {
action = "close",
neigh_pattern = "[^\\].",
pair = "()"
},
["["] = {
action = "open",
neigh_pattern = "[^\\].",
pair = "[]"
},
["]"] = {
action = "close",
neigh_pattern = "[^\\].",
pair = "[]"
},
["`"] = {
action = "closeopen",
neigh_pattern = "[^\\].",
pair = "``",
register = {
cr = false
}
},
["{"] = {
action = "open",
neigh_pattern = "[^\\].",
pair = "{}"
},
["}"] = {
action = "close",
neigh_pattern = "[^\\].",
pair = "{}"
}
},
modes = {
command = false,
insert = true,
terminal = false
}
}
also, this is the setup i have in my config
sure, here's the config I got through the command:
Hmm, this look about right.
Would you mind trying to reproduce this with clean config in which only 'mini.pairs' installed and active? For this:
Paste the following code in that 'init.lua' file:
local path_package = vim.fn.stdpath('data') .. '/site/'
local mini_path = path_package .. 'pack/deps/start/mini.nvim'
if not vim.loop.fs_stat(mini_path) then
vim.cmd('echo "Installing `mini.nvim`" | redraw')
local clone_cmd = { 'git', 'clone', '--filter=blob:none', 'https://github.com/echasnovski/mini.nvim', mini_path }
vim.fn.system(clone_cmd)
vim.cmd('packadd mini.nvim | helptags ALL')
vim.cmd('echo "Installed `mini.nvim`" | redraw')
end
require('mini.pairs').setup()
NVIM_APPNAME=nvim-minipairs nvim
and wait for 'mini.nvim' to be installed.Also it would be helpful to share a bit more info:
nvim --version
. There might be a different source of Lua or something.Thanks for the step-by-step guide. I'll give it a go and keep you updated when I got time. For now I'll just use nvim-autopairs as a replacement.
Contributing guidelines
Module(s)
mini.pairs
Description
when trying to insert any paired symbols, an error message would pop up and a 0 will inserted instead.
Neovim version
v0.9.5
Steps to reproduce
Expected behavior
No response
Actual behavior
an error message will show up, and a 0 will be inserted instead.