emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 4c85df2 02/49: Close #212: Don't block in eglot-i


From: Stefan Monnier
Subject: [elpa] externals/eglot 4c85df2 02/49: Close #212: Don't block in eglot-imenu if performing non-essential task
Date: Wed, 17 Mar 2021 18:41:42 -0400 (EDT)

branch: externals/eglot
commit 4c85df2b04e467b8ed0eca68bd202fd0e7b671f4
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]