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.
GitHub-reference: close https://github.com/joaotavora/eglot/issues/212
(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."