]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow staying out of flymake-mode, eldoc-mode
authorAugusto Stoffel <arstoffel@gmail.com>
Sat, 22 May 2021 10:53:38 +0000 (12:53 +0200)
committerGitHub <noreply@github.com>
Sat, 22 May 2021 10:53:38 +0000 (11:53 +0100)
* eglot.el (eglot--managed-mode): don't enable flymake or eldoc when
those symbols belong to eglot-stay-out-of.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/671

lisp/progmodes/eglot.el

index db468d83c14a58d4f8430d228b29f8bc1e8af0ff..13d9952494aea7bc854b792de539e90ddfa80ed4 100644 (file)
@@ -1500,8 +1500,8 @@ Use `eglot-managed-p' to determine if current buffer is managed.")
     (unless (eglot--stay-out-of-p 'imenu)
       (add-function :before-until (local 'imenu-create-index-function)
                     #'eglot-imenu))
-    (flymake-mode 1)
-    (eldoc-mode 1)
+    (unless (eglot--stay-out-of-p 'flymake) (flymake-mode 1))
+    (unless (eglot--stay-out-of-p 'eldoc) (eldoc-mode 1))
     (cl-pushnew (current-buffer) (eglot--managed-buffers (eglot-current-server))))
    (t
     (remove-hook 'after-change-functions 'eglot--after-change t)