Long delay on :q when exiting Neovim with copilot.vim enabled, even with session counting patches — any suggestions?
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 30/100
研究方向
首先使用回報的 Neovim、Node.js 和 Linux 版本,在一段閒置時間後啟用 copilot.vim 並執行 :q,重現約 10 秒的延遲。檢查 VimLeavePre 的處理、github_copilot autocmd 群組,以及 issue 中描述的 copilot node-process 關閉程序。完成的標準是在不停用 Copilot 功能的情況下識別並解決阻塞退出行為,並在一次閒置工作階段中驗證結果。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Vim Script
- 星號
- 11.7k
- 分支
- 812
- PR 合併指標
- 30 天內沒有已合併 PR
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/copilot.vim 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 82/100
github/copilot.vim#303 ·
-
難度 2/5 1-3 小時 新手友好度 72/100
github/copilot.vim#276 · 1 則留言 · 1 個 reaction ·
-
Neomarley 未關閉
難度 5/5 一週以上 新手友好度 1/100
github/copilot.vim#304 · 1 個 reaction ·
-
Readme. 未關閉
難度 2/5 1-3 小時 新手友好度 20/100
github/copilot.vim#302 · 4 則留言 ·
-
Micky 未關閉
難度 5/5 一週以上 新手友好度 1/100
github/copilot.vim#301 ·
查看 github/copilot.vim 的全部 Issue
相似的 Issue
-
area: harness bug status: needs-triage
難度 2/5 1-3 小時 新手友好度 75/100
Human-Agent-Society/reef#625 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
vercel-labs/just-bash#464 ·
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100