From 212a7f7ba5f8480b3f94c41e77e21e953685937c Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Sun, 6 Oct 2019 16:10:32 +0000 Subject: [PATCH] Per #315: call shutdown/exit methods with params:{}, not null "null" is not a valid JSON value for "params" according to the JSON-RPC specification. * eglot.el (eglot-shutdown): Do the same thing as for "initialized", and use an empty hash table to be serialized to {}. Copyright-paperwork-exempt: yes --- eglot.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eglot.el b/eglot.el index 1decb269..1bdca126 100644 --- a/eglot.el +++ b/eglot.el @@ -595,8 +595,9 @@ SERVER. ." (unwind-protect (progn (setf (eglot--shutdown-requested server) t) - (jsonrpc-request server :shutdown nil :timeout (or timeout 1.5)) - (jsonrpc-notify server :exit nil)) + (jsonrpc-request server :shutdown (make-hash-table) + :timeout (or timeout 1.5)) + (jsonrpc-notify server :exit (make-hash-table))) ;; Now ask jsonrpc.el to shut down the server. (jsonrpc-shutdown server (not preserve-buffers)) (unless preserve-buffers (kill-buffer (jsonrpc-events-buffer server)))))