diff options
| author | Olivia Kinnear <git@superatomic.dev> | 2026-01-02 01:58:10 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-02 01:58:10 -0500 |
| commit | a03ab03a10ada68b74e292a16493047da414e3ee (patch) | |
| tree | 523a7b2bd98a7914168706ec0f6e3d86df87b30a /test/functional/vimscript/executable_spec.lua | |
| parent | 3ac76977bca5ce204fea856d69d52895f67332e5 (diff) | |
| download | rneovim-a03ab03a10ada68b74e292a16493047da414e3ee.tar.gz rneovim-a03ab03a10ada68b74e292a16493047da414e3ee.tar.bz2 rneovim-a03ab03a10ada68b74e292a16493047da414e3ee.zip | |
fix(lsp): `:lsp restart` restarts on client exit #37125
Problem:
`:lsp restart` detects when a client has exited by using the `LspDetach`
autocommand. This works correctly in common cases, but breaks when
restarting a client which is not attached to any buffer. It also breaks
if a client is detached in between `:lsp restart` and the actual
stopping of the client.
Solution:
Move restart logic into `vim/lsp/client.lua`, so it can hook in to
`_on_exit()`. The public `on_exit` callback cannot be used for this, as
`:lsp restart` needs to ensure the restart only happens once, even if
the command is run multiple times on the same client.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions