branch: externals/eglot
commit 4c85df2b04e467b8ed0eca68bd202fd0e7b671f4
Author: João Távora <[email protected]>
Commit: João Távora <[email protected]>
Close #212: Don't block in eglot-imenu if performing non-essential task
eglot-imenu is used by imenu which in turn is used by which-func-mode
called from an idle timer. We don't want it to block in that
situation. Latest which-func mode now sets "non-essential" when
performing its duties, so we leverage that in eglot-imenu.
* eglot.el (eglot-imenu): Use non-essential.
---
eglot.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/eglot.el b/eglot.el
index 1a53c16..c7f70ea 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2415,7 +2415,8 @@ is not active."
(jsonrpc-request (eglot--current-server-or-lose)
:textDocument/documentSymbol
`(:textDocument
- ,(eglot--TextDocumentIdentifier))))))))
+ ,(eglot--TextDocumentIdentifier))
+ :cancel-on-input non-essential))))))
(defun eglot--apply-text-edits (edits &optional version)
"Apply EDITS for current buffer if at VERSION, or if it's nil."