1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

nvim + vim-plug でAn unknown element "" was received. This can happen if the remote process closed or ended abnormally.

Last updated at Posted at 2022-10-17

備忘録なので簡単に。

使用環境

PowerShell 7.2.6
nvim (NVIM v0.9.0-dev-71-gd9a80b8e2)
→ NVIM v0.7.0でも発生
vim-plug

未確認ですがこれ以外の環境でも発生する可能性があります。

問題

PlugUpdateをすると、以下のようなエラーが発生してアップデートが失敗する。

An unknown element "" was received. This can happen if the remote process closed or ended abnormally.

原因と解決策

根本的な原因は不明ですが、nvim+vim-plugでshell=powershellやpwshにしていると発生する・・・?
ShellをPowerShellにしていたので、それを外すと一応大丈夫になるっぽい?
PowerShellが使えなくななりますが・・・。

あまり時間かけてられないので、とりあえずShellをPowerShellからデフォルトを使うように変更しました。
原因等まだはっきりしてないのですが、治せるなら後でパッチ作成してプルリク送りたいです。(nvim?vim-plug?どっちだろう・・・)
私のinit.vimではvim用のvimrcと共用なので以下のようにnvimではpwshに設定されないようにした。

initi.vim
if has('win32') && !has('nvim') "Windows
    if executable('pwsh')
        set shell=pwsh
    elseif executable('powershell')
        set shell=powershell
    endif
endif

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?