diff --git a/lisp/editor-completion.el b/lisp/editor-completion.el index a762907c..bcc2079f 100644 --- a/lisp/editor-completion.el +++ b/lisp/editor-completion.el @@ -374,12 +374,14 @@ Just put this function in `hippie-expand-try-functions-list'." ("pyright-langserver" "--stdio") "jedi-language-server")))) - (defun expand-absolute-name (name) - (if (file-name-absolute-p name) - (tramp-file-local-name - (expand-file-name - (concat (file-remote-p default-directory) name))) - name)) + (cl-defmethod eglot-handle-notification :after + (_server (_method (eql textDocument/publishDiagnostics)) &key uri + &allow-other-keys) + (when-let ((buffer (find-buffer-visiting (eglot-uri-to-path uri)))) + (with-current-buffer buffer + (if (and (eq nil flymake-no-changes-timeout) + (not (buffer-modified-p))) + (flymake-start t))))) (when (fboundp #'tabnine-completion-at-point) (add-hook 'eglot-managed-mode-hook @@ -392,6 +394,13 @@ Just put this function in `hippie-expand-try-functions-list'." (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) + (defun expand-absolute-name (name) + (if (file-name-absolute-p name) + (tramp-file-local-name + (expand-file-name + (concat (file-remote-p default-directory) name))) + name)) + ;; TODO: ;; https://github.com/joaotavora/eglot/discussions/876 ;; https://github.com/microsoft/pyright/issues/3282