Bug
After upgrading to Neovim 0.12, <leader>rr (:restart) triggers an nvim-unception error:
Failed to source nvim-unception/plugin/main.lua
...
vim.lua connection failed: connection refused
client.lua:21: in main chunk (sockconnect)
Root cause
nvim-unception/lua/server/server.lua calls vim.call("setenv", "NVIM_UNCEPTION_PIPE_PATH_HOST", ...) which sets the env var on the actual process environment of the running nvim instance.
When :restart is called, the new nvim process inherits this env var. It sees NVIM_UNCEPTION_PIPE_PATH_HOST pointing to the old (now dead) socket, enters client mode, and sockconnect fails.
Fix (applied in mappings.lua)
Unset the env var before restarting:
vim.fn.setenv("NVIM_UNCEPTION_PIPE_PATH_HOST", vim.NIL)
vim.cmd("restart +qall!")
Open question
Why did this start surfacing in 0.12? Likely :restart changed how it spawns the new process — possibly switched to execvp()-style replacement (fully inheriting process env) vs previously spawning a subprocess with a cleaner env. Worth investigating what changed in neovim core's restart implementation between 0.11 and 0.12.
Bug
After upgrading to Neovim 0.12,
<leader>rr(:restart) triggers an nvim-unception error:Root cause
nvim-unception/lua/server/server.luacallsvim.call("setenv", "NVIM_UNCEPTION_PIPE_PATH_HOST", ...)which sets the env var on the actual process environment of the running nvim instance.When
:restartis called, the new nvim process inherits this env var. It seesNVIM_UNCEPTION_PIPE_PATH_HOSTpointing to the old (now dead) socket, enters client mode, andsockconnectfails.Fix (applied in mappings.lua)
Unset the env var before restarting:
Open question
Why did this start surfacing in 0.12? Likely
:restartchanged how it spawns the new process — possibly switched toexecvp()-style replacement (fully inheriting process env) vs previously spawning a subprocess with a cleaner env. Worth investigating what changed in neovim core's restart implementation between 0.11 and 0.12.