|
|
Problem:
Only the stdio channel can "own" a server (self-exit on close). After
:restart the TUI reconnects over a socket, so the restarted server does
not have "self-exit" behavior when the channel closes (e.g. by UI
disconnect, host-terminal close, etc.), which leaves a dangling server.
Solution:
- Introduce `nvim_chan_set`. (`nvim_set_client_info` doesn't fit:
exposing it to Lua would require a `channel` param, which is not
backwards-compatible, plus it's awkward because it doesn't merge info.)
- Broadcast per-channel properties in the "restart" UI event as an
opaque dict (a potentially useful pattern for other UI-events in the
future).
- UIs are expected to restore the channel properties on restart.
- `nvim_get_chan_info()` reports "detach".
- Remove `nvim__chan_set_detach()`.
|