summaryrefslogtreecommitdiffstats
path: root/lisp/init-python.el
blob: ec6c741208d33268861a321e1dd17b2a22e6c8c5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(defun python-mode-buffer-local-variables ()
  ;; highlight lines longer than 88 characters
  (setq-local fill-column 88)
  ;; use flat index in imenu
  (setq-local imenu-create-index-function
              'python-imenu-create-flat-index))

(use-package python
  :ensure nil ;; package is bundled with emacs
  :commands python-mode
  :hook (python-mode . python-mode-buffer-local-variables)
  :config
  ;; use flake8 as flymake backend
  (setq python-flymake-command '("flake8" "-")))

(provide 'init-python)