Is there a way to make flymake to compile only when saving

When I print flymake, the cursor hangs a bit. This is annoying.

I was wondering if there is a way to tell flymake not to parse and compile every time I change something, just do it when I save.

Any other suggestion?

Thank,

+3
source share
1 answer

You can override flymake-after-change-functionfrom flymake.el by placing this in your file .emacsor init.el:

(eval-after-load "flymake"
  '(progn
    (defun flymake-after-change-function (start stop len)
      "Start syntax check for current buffer if it isn't already running."
      ;; Do nothing, don't want to run checks until I save.
      )))

You will still get parsing when saving and during initial file download, if you do not like the initial syntax check when downloading a file, you should be able to (I have not tested this part) to disable it:

(setq flymake-start-syntax-check-on-find-file nil)

: , , , , , :

;; Only run flymake if I've not been typing for 5 seconds
(setq flymake-no-changes-timeout 5)

- 0,5 , , , 5, , , .

+2

All Articles