From 6b59dcf652301a98d96e539509fad26a873db6f8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felici=C3=A1n=20N=C3=A9meth?= Date: Thu, 16 Apr 2020 09:38:31 +0200 Subject: [PATCH] Send shutdown and exit messages without arguments Fix regression introduced in 70e6157b (https://github.com/joaotavora/eglot/issues/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. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/430 --- lisp/progmodes/eglot.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index fe06e0c9ada..3149cd5cc01 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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))))) -- 2.39.2