[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 6d87de1 35/69: Treat null/nil server capabilities
From: |
João Távora |
Subject: |
[elpa] externals/eglot 6d87de1 35/69: Treat null/nil server capabilities as false |
Date: |
Sun, 20 Oct 2019 08:21:48 -0400 (EDT) |
branch: externals/eglot
commit 6d87de16c5f86c5479db5e6705f0fb93fe727d3e
Author: Joram Schrijver <address@hidden>
Commit: Joram Schrijver <address@hidden>
Treat null/nil server capabilities as false
Some language servers may specify null for some capabilities in the list
of server capabilities. This does not conform to the specification, but
treating it as false is more reasonable than treating it as true.
A current example is the PHP language server. which specifies null for
every capability it does not handle, like documentHighlightProvider.
This would cause Eglot to send constant textDocument/documentHighlight
requests, which all timed out.
* eglot.el (eglot--server-capable): Change the handling of null values
for capabilities to treat them as false instead of true.
Copyright-paperwork-exempt: yes
---
eglot.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/eglot.el b/eglot.el
index 23d53ed..845f029 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1101,6 +1101,9 @@ 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)))))
- [elpa] externals/eglot b868ee1 23/69: Fix #260: Only consider Eglot's own diagnostics in eglot-code-actions, (continued)
- [elpa] externals/eglot b868ee1 23/69: Fix #260: Only consider Eglot's own diagnostics in eglot-code-actions, João Távora, 2019/10/20
- [elpa] externals/eglot 5f629eb 26/69: Add built-in support for Elixir's elixir-ls (#264), João Távora, 2019/10/20
- [elpa] externals/eglot 356100a 19/69: Fix #220: don't sort xref's by default, João Távora, 2019/10/20
- [elpa] externals/eglot 195c311 22/69: Fix local function call in directory watcher (#255), João Távora, 2019/10/20
- [elpa] externals/eglot 2df3991 13/69: Fix #206: Update README.md, João Távora, 2019/10/20
- [elpa] externals/eglot 8d0c8de 05/69: Add NEWS.md file and rework README.md, João Távora, 2019/10/20
- [elpa] externals/eglot b4f3028 18/69: Fix #223: use a less buggy Flymake, João Távora, 2019/10/20
- [elpa] externals/eglot 6c884c4 24/69: Fix #263: fix case when eglot-put-doc-in-help-buffer is nil, João Távora, 2019/10/20
- [elpa] externals/eglot e28b396 25/69: Fix #259: work around a bug in Emacs's change detection, João Távora, 2019/10/20
- [elpa] externals/eglot 2372bc8 30/69: Fixed extra ) in python example snippet (#287), João Távora, 2019/10/20
- [elpa] externals/eglot 6d87de1 35/69: Treat null/nil server capabilities as false,
João Távora <=
- [elpa] externals/eglot 7f31f29 36/69: Use gopls server as the default for Go (#304), João Távora, 2019/10/20
- [elpa] externals/eglot 4548202 28/69: Simplify eldoc usage (#269), João Távora, 2019/10/20
- [elpa] externals/eglot 36b7cf32 38/69: Fix #272: also use signature label offsets for parameter info, João Távora, 2019/10/20
- [elpa] externals/eglot 059ea59 43/69: Optionally shutdown after killing last buffer of managed project (#309), João Távora, 2019/10/20
- [elpa] externals/eglot 59ba0b1 39/69: New README section on how to best report bugs to Eglot, João Távora, 2019/10/20
- [elpa] externals/eglot ce983d1 47/69: Revert "Treat null/nil server capabilities as false", João Távora, 2019/10/20
- [elpa] externals/eglot 4693abf 50/69: Fix #258: Allow user to set idle time to wait before processing changes, João Távora, 2019/10/20
- [elpa] externals/eglot 14ab804 54/69: Fix #318: unbreak xref-find-definitions, João Távora, 2019/10/20
- [elpa] externals/eglot dbb5dd4 57/69: Slightly more robust completion tests, João Távora, 2019/10/20
- [elpa] externals/eglot 3604173 64/69: Unbreak eglot--setq-saving if symbol is unbound, João Távora, 2019/10/20