summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-06-21 18:02:57 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-26 14:15:02 -0700
commitc06dc44843fed42d925740ad21bd097fd33f61dd (patch)
tree7a8c186d373a9d0190051bc7182898152699926a /emacs
parentfeat(eshell): change the prompt to be like fish (diff)
downloademacs.d-c06dc44843fed42d925740ad21bd097fd33f61dd.tar.gz
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
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-prog.el18
1 files changed, 7 insertions, 11 deletions
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))