summary refs log tree commit diff
path: root/emacs/custom/my-flymake.el
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-10-14 17:40:33 -0700
committerFranck Cuny <franck@fcuny.net>2022-10-14 17:40:33 -0700
commite599383162f5103d033a61be833aa27fef1895a5 (patch)
tree21e75fb2c3f7607a3147c9a479599a57e1d273ea /emacs/custom/my-flymake.el
parentfix(prog/lsp): apply a number of fixes related to LSP (diff)
downloademacs.d-e599383162f5103d033a61be833aa27fef1895a5.tar.gz
ref: move flymake and eldoc configuration to their own libraries
Change-Id: Ida9e0f7d6ee25cf5fe8e208d1ae5c77aa28cfe0f
Diffstat (limited to '')
-rw-r--r--emacs/custom/my-flymake.el22
1 files changed, 22 insertions, 0 deletions
diff --git a/emacs/custom/my-flymake.el b/emacs/custom/my-flymake.el
new file mode 100644
index 0000000..74ae98d
--- /dev/null
+++ b/emacs/custom/my-flymake.el
@@ -0,0 +1,22 @@
+;;; my-flymake.el --- configure flymake -*- lexical-binding: t -*-
+;; Author: Franck Cuny <franck@fcuny.net>
+
+;;; Commentary:
+
+;;; Code:
+
+(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))
+
+(provide 'my-flymake)
+
+;;; my-flymake.el ends here