Skip to content

Commit

Permalink
Fix #430: send shutdown and exit messages without arguments
Browse files Browse the repository at this point in the history
Fix regression introduced in 212a7f7 (#315).  According to the
LSP specification the exit notification and the shutdown request
shouldn't have arguments ("params: void").  Note that jsonrpc.el
send nil as null on the wire.

* eglot.el (eglot-shutdown): Change back the arguments of
:shutdown and :exit to nil.
  • Loading branch information
nemethf committed Apr 16, 2020
1 parent 864a493 commit 4f6e152
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -598,9 +598,8 @@ SERVER. ."
(unwind-protect
(progn
(setf (eglot--shutdown-requested server) t)
(jsonrpc-request server :shutdown eglot--{}
:timeout (or timeout 1.5))
(jsonrpc-notify server :exit eglot--{}))
(jsonrpc-request server :shutdown nil :timeout (or timeout 1.5))
(jsonrpc-notify server :exit nil))
;; Now ask jsonrpc.el to shut down the server.
(jsonrpc-shutdown server (not preserve-buffers))
(unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))
Expand Down

0 comments on commit 4f6e152

Please sign in to comment.