summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-08-04 09:58:59 -0400
committerKyle Meyer <kyle@kyleam.com>2018-08-04 09:58:59 -0400
commit1bed31d777993749f24b5cd82a22e238bc218450 (patch)
tree9b6548e2ccc5e97419919835c854f363ce98e06b /init.el
parent0168be1073288e98c9d82e8a7f4d421760e662c7 (diff)
downloademacs.d-1bed31d777993749f24b5cd82a22e238bc218450.tar.gz
python: Set up flycheck
Diffstat (limited to 'init.el')
-rw-r--r--init.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.el b/init.el
index e240c90..5fc7eb5 100644
--- a/init.el
+++ b/init.el
@@ -1991,6 +1991,14 @@
(add-hook 'python-mode-hook #'km/python-set-local-vars)
(add-hook 'python-mode-hook 'flyspell-prog-mode)
+ (add-hook 'python-mode-hook
+ (lambda ()
+ (when (eq major-mode 'python-mode)
+ (setq flycheck-checker 'python-flake8)
+ (setq-local flycheck-python-flake8-executable "flake8")
+ (setq-local flycheck-python-pylint-executable "pylint3")
+ (flycheck-mode 1))))
+
(bind-keys :map python-mode-map
("C-c C-b" . python-shell-send-buffer)
("C-c C-f" . python-shell-send-defun)