InfoView updates in Insert Mode interfere with other plugins input handling
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Reproduce the failure with the Lean InfoView open and nvim-autopairs custom rules enabled, then compare it with the provided InsertEnter and InsertLeave callbacks that pause and unpause the InfoView pin. Inspect the interaction around lean.infoview.get_current_infoview() and pin updates. Done means Space expansion and jumping over closing pairs work while the InfoView remains open.
Written by the indexing model from the issue text.
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,
})
- Dominant language
- Lua
- Stars
- 607
- Forks
- 63
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Julian/lean.nvim
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 3/5 1-2 days Newbie friendliness 56/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
All issues in Julian/lean.nvim
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jitsi/jitsi-meet#18020 ·
Maintainers usually reply within 1 day
-
GTK4 apps (Nautilus) aren't blurred: GTK 4.24's ext-background-effect makes Hyprland 0.56 skip blurOpen
Difficulty 1/5 Under an hour Newbie friendliness 94/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
windwp/nvim-ts-autotag#266 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
folke/sidekick.nvim#362 ·