Long delay on :q when exiting Neovim with copilot.vim enabled, even with session counting patches — any suggestions?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
Beginne damit, die etwa 10-sekündige Verzögerung bei :q mit aktiviertem copilot.vim nach einer Leerlaufphase zu reproduzieren, unter Verwendung der gemeldeten Versionen von Neovim, Node.js und Linux. Untersuche die Behandlung von VimLeavePre, die autocmd-Gruppe github_copilot und das im Issue beschriebene Herunterfahren des copilot node-process. Als erledigt gilt die Identifizierung und Behebung des blockierenden Exit-Verhaltens, ohne die Copilot-Funktionalität zu deaktivieren; das Ergebnis muss in einer einzelnen Leerlaufsitzung verifiziert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi,
I’m experiencing a significant delay (~10 seconds) when quitting Neovim (:q) with copilot.vim enabled, and this happens even with a single Neovim session after it has been idle for a while.
To mitigate this, I’ve tried:
Adding a session counter (both Lua in init.lua and Vimscript in a plugin/copilot_session.vim patch) to track how many Neovim sessions with Copilot are active.
On VimLeavePre, only calling Copilot disable and killing the copilot node process when the last session exits, skipping it otherwise to avoid the stall.
Clearing Copilot’s own VimLeavePre autocmd group (github_copilot) in all but the last session to prevent multiple shutdown hooks running.
Avoiding forcibly killing node processes except on the last session exit.
However, the stall still occurs on quit even when only one Neovim session is open and idle. The copilot node process appears to be killed during exit, and I suspect Copilot’s internal shutdown logic is blocking Neovim exit.
My questions are:
Are there known issues in copilot.vim causing blocking delays on exit after idle?
Is there an official or recommended way to make Copilot’s shutdown asynchronous or non-blocking?
How can I reliably prevent the exit delay without disabling Copilot’s essential functionality?
Are there patches, config workarounds, or plugin updates that address this problem?
Thanks in advance for any insights or help!
NVIM v0.11.1
Build type: RelWithDebInfo
LuaJIT 2.1.1741730670
node --version
v22.15.1
Linux 4.18.0-477.21.1.el8_8.x86_64 #1 SMP Thu Jul 20 08:38:27 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
- Vorherrschende Sprache
- Vim Script
- Sterne
- 11.7k
- Forks
- 812
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/copilot.vim
-
No link to DeepWiki Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
github/copilot.vim#303 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/copilot.vim#276 · 1 Kommentar · 1 Reaktion ·
-
Neomarley Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 1/100
github/copilot.vim#304 · 1 Reaktion ·
-
Readme. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 20/100
github/copilot.vim#302 · 4 Kommentare ·
-
Micky Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 1/100
github/copilot.vim#301 ·
Alle Issues in github/copilot.vim
Ähnliche Issues
-
area: harness bug status: needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Human-Agent-Society/reef#625 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
vercel-labs/just-bash#464 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100