Disabling single-quote pairing affects double-quote pairing as well
yohannd1 opened this issue · comments
Yohanan commented
Description
After pressing single-quote on a line, it will not pair (as expected), but double-quotes placed on the right of it won't pair anymore.
Mapping bug
No response
Steps to reproduce
- Open neovim (
nvim -u minimal.lua
) - Wait for the
Ready!
message to appear :e test.lisp
- Go into insert mode and type
"foo
. It should be pairing correctly (the result is"foo"
) - Type
<Esc>A 'foo
. It should not pair (result"foo" 'foo
) - Type
<Esc>A "baz
. It should pair, yet it won't (result"foo" 'foo "baz
) - Type
<Esc>0Ea "bar
. It should pair, and it works (result"foo" "bar" 'foo "baz
)
Minimal config
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
require('packer').startup {
{
'wbthomason/packer.nvim',
{
'windwp/nvim-autopairs',
},
},
config = {
package_root = package_root,
compile_path = install_path .. '/plugin/packer_compiled.lua',
display = { non_interactive = true },
},
}
end
_G.load_config = function()
local autopairs = require("nvim-autopairs")
autopairs.setup()
local sq_rule = autopairs.get_rules("'")[1]
sq_rule.not_filetypes = {"lisp"}
end
if vim.fn.isdirectory(install_path) == 0 then
print("Installing nvim-autopairs and dependencies.")
vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
stale commented
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Yohanan commented
(Should I... try to un-stale it?)