0

I am using elpy with emacs and flake8 as my syntax checker.

I find that it keeps checking for syntax everytime i type, like if start opening a parenthesis it complains of syntax error, this leads to me not being able to see function declarations while typing and slows down emacs too.

How do i remove this functionality so that syntax is checked only when i save the file.

Here are the relevant lines from my emacs configuration.

(elpy-enable)
(pyvenv-activate (expand-file-name "~/lpackages/anaconda3/envs/MLenv"))
(setq elpy-rpc-backend "jedi")
;;(elpy-use-ipython)

(require 'python)
(setq python-shell-interpreter "ipython"
   python-shell-interpreter-args "--simple-prompt -i")

(require 'py-autopep8)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)


;;import company settings
(require 'company-config)
Vikash Balasubramanian
  • 2,921
  • 3
  • 33
  • 74
  • This could be a problem of `flycheck`. What is your configuration for that plugin? – Trung Ta Aug 17 '16 at 02:51
  • No configuration, i just left it as default, i thought elpy uses flymake? And flycheck will only work if i add a hook for it in elpy-mode-hook right? – Vikash Balasubramanian Aug 17 '16 at 06:24
  • Sorry, I mistook flycheck and flymake. In the case of using external syntax checker, it sould be flymake. Btw, this post seems to address the same issue with you. Can you check if it is helpful? http://stackoverflow.com/questions/6110691/is-there-a-way-to-make-flymake-to-compile-only-when-i-save – Trung Ta Aug 17 '16 at 06:37
  • Thanks, that solves the issue, i didn't notice that question, differently worded title and all. – Vikash Balasubramanian Aug 17 '16 at 06:52

0 Answers0