From fe37d7e3ce796a2bee21af6a0b34de59aef1daca Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Sat, 5 Oct 2019 11:46:08 +0100 Subject: [PATCH] Revert "treat null/nil server capabilities as false" This reverts commit 645bcfc6e57181c39dae1f238758e76c1759a765. A capability of "null" is downright invalid, and must NOT be mistaken for a value of "{}" (which indicates the presence of the capability) or "False" (which indicates its asence). See https://github.com/microsoft/language-server-protocol/issues/830#issuecomment-537849292 for a clarification from the LSP maintainer. --- lisp/progmodes/eglot.el | 3 --- 1 file changed, 3 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index ef7f8f0a3ec..d1a1a3d0b20 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1113,9 +1113,6 @@ under cursor." for probe = (plist-member caps feat) if (not probe) do (cl-return nil) if (eq (cadr probe) :json-false) do (cl-return nil) - ;; If the server specifies null as the value of the capability, it - ;; makes sense to treat it like false. - if (null (cadr probe)) do (cl-return nil) if (not (listp (cadr probe))) do (cl-return (if more nil (cadr probe))) finally (cl-return (or (cadr probe) t))))) -- 2.39.2