(add-hook 'post-self-insert-hook #'eglot--post-self-insert-hook nil t)
(add-hook 'pre-command-hook #'eglot--pre-command-hook nil t)
(eglot--setq-saving xref-prompt-for-identifier nil)
- (eglot--setq-saving flymake-diagnostic-functions '(eglot-flymake-backend))
(eglot--setq-saving company-backends '(company-capf))
(eglot--setq-saving company-tooltip-align-annotations t)
(eglot--setq-saving eldoc-documentation-strategy
(add-function :before-until (local 'imenu-create-index-function)
#'eglot-imenu))
(unless (eglot--stay-out-of-p 'flymake)
+ (add-hook 'flymake-diagnostic-functions #'eglot-flymake-backend nil t)
(if flymake-mode (flymake-start) (flymake-mode 1)))
(unless (eglot--stay-out-of-p 'eldoc)
(add-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function
(remove-hook 'pre-command-hook #'eglot--pre-command-hook t)
(remove-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function t)
(remove-hook 'eldoc-documentation-functions #'eglot-signature-eldoc-function t)
+ (remove-hook 'flymake-diagnostic-functions #'eglot-flymake-backend t)
(cl-loop for (var . saved-binding) in eglot--saved-bindings
do (set (make-local-variable var) saved-binding))
(remove-function (local 'imenu-create-index-function) #'eglot-imenu)