From c06dc44843fed42d925740ad21bd097fd33f61dd Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Tue, 21 Jun 2022 18:02:57 -0700 Subject: fix(prog): simplify flymake's configuration to work with eglot I've been running into issues between flymake and eglot for a while now. After modifying the file, flymake would report errors on possible typo I made while editing, but once I've fixed them, the diagnostic would not be updated until I either restart eglot or kick another flymake run. After some debugging I'm pretty convinced this is due to the variable `flymake-no-changes-timeout`. I've been running for a few hours without it being set and I've not been able to reproduce the problem. The other variables are set to their default value, this is not needed. Change-Id: I770857a93b6d90193f39ee0dceaa19b0b928a3d8 --- emacs/custom/my-prog.el | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'emacs/custom') diff --git a/emacs/custom/my-prog.el b/emacs/custom/my-prog.el index 379262f..65faad2 100644 --- a/emacs/custom/my-prog.el +++ b/emacs/custom/my-prog.el @@ -20,17 +20,13 @@ ;; Jump to first error (customize-set-variable 'compilation-scroll-output 'first-error) -(customize-set-variable 'flymake-start-on-flymake-mode t) -(customize-set-variable 'flymake-start-on-save-buffer t) -(customize-set-variable 'flymake-no-changes-timeout nil) -(customize-set-variable 'flymake-proc-compilation-prevents-syntax-check t) -(customize-set-variable 'flymake-wrap-around nil) -(customize-set-variable 'elisp-flymake-byte-compile-load-path load-path) - -(with-eval-after-load 'flymake - (define-key flymake-mode-map (kbd "C-c ! n") 'flymake-goto-next-error) - (define-key flymake-mode-map (kbd "C-c ! p") 'flymake-goto-prev-error) - (define-key flymake-mode-map (kbd "C-c ! d") 'flymake-show-diagnostics-buffer)) +(require 'flymake) +(setq flymake-start-on-save-buffer t) +(setq elisp-flymake-byte-compile-load-path load-path) + +(define-key flymake-mode-map (kbd "C-c ! n") 'flymake-goto-next-error) +(define-key flymake-mode-map (kbd "C-c ! p") 'flymake-goto-prev-error) +(define-key flymake-mode-map (kbd "C-c ! d") 'flymake-show-diagnostics-buffer) (dolist (hook '(prog-mode-hook conf-mode-hook)) (add-hook hook 'flymake-mode)) -- cgit 1.4.1