-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
I have encountered an issue where nvim-autopairs custom rules (specifically Space expansion and jumping over closing pairs) fail to trigger when the Lean InfoView is open. When the InfoView is closed (or toggled off), nvim-autopairs works perfectly. When the InfoView is open, nvim-autopairs appears to fail silently and falls back to inserting the raw character instead of executing the rule. I do not know why (infoview hogging the thread?).
Turning off Infoview allows autopairs to work correctly. For now I'm doing it by pausing infoview when in Insert Mode.
local lean_group = vim.api.nvim_create_augroup("LeanAutoPause", { clear = true })
vim.api.nvim_create_autocmd("InsertEnter", {
group = lean_group,
pattern = "*.lean",
callback = function()
local iv = require('lean.infoview').get_current_infoview()
if iv and iv.info and iv.info.pin then
iv.info.pin:pause()
end
end,
})
vim.api.nvim_create_autocmd("InsertLeave", {
group = lean_group,
pattern = "*.lean",
callback = function()
local iv = require('lean.infoview').get_current_infoview()
if iv and iv.info and iv.info.pin then
iv.info.pin:unpause()
end
end,
})Metadata
Metadata
Assignees
Labels
No labels