@@ -201,13 +201,12 @@ func (s *Manager) startServer(ctx context.Context, name, filepath string, server
203 switch client.GetServerState() {
203 switch client.GetServerState() {
204− case StateReady, StateStarting:
204+ case StateReady, StateStarting, StateDisabled:
205 // already done, return
205 // already done, return
209 client.serverState.Store(StateStarting)
209 client.serverState.Store(StateStarting)
210− s.callback(name, client)
212 initCtx, cancel := context.WithTimeout(ctx, time.Duration(cmp.Or(cfg.Timeout, 30))*time.Second)
211 initCtx, cancel := context.WithTimeout(ctx, time.Duration(cmp.Or(cfg.Timeout, 30))*time.Second)
213 defer cancel()
212 defer cancel()
@@ -315,6 +314,7 @@ func (s *Manager) KillAll(context.Context) {
315 defer func() { s.callback(name, client) }()
314 defer func() { s.callback(name, client) }()
316 client.client.Kill()
315 client.client.Kill()
317 client.SetServerState(StateStopped)
316 client.SetServerState(StateStopped)
318 slog.Debug("Killed LSP client", "name", name)
318 slog.Debug("Killed LSP client", "name", name)
@@ -335,6 +335,7 @@ func (s *Manager) StopAll(ctx context.Context) {
335 slog.Warn("Failed to stop LSP client", "name", name, "error", err)
335 slog.Warn("Failed to stop LSP client", "name", name, "error", err)
337 client.SetServerState(StateStopped)
337 client.SetServerState(StateStopped)
338 slog.Debug("Stopped LSP client", "name", name)
339 slog.Debug("Stopped LSP client", "name", name)