improve erc-sasl
[Emacs.git] / lisp / init-python.el
blob1c20728ce760087b89ac43fa5d1b70d913e25e3b
1 ;;; init-python.el --- Python editing -*- lexical-binding: t -*-
2 ;;; Commentary:
3 ;;; Code:
5 ;; I use nix + direnv instead of virtualenv/pyenv/pyvenv, and it is an
6 ;; approach which extends to other languages too. I recorded a
7 ;; screencast about this: https://www.youtube.com/watch?v=TbIHRHy7_JM
10 (setq auto-mode-alist
11 (append '(("SConstruct\\'" . python-mode)
12 ("SConscript\\'" . python-mode))
13 auto-mode-alist))
15 (setq python-shell-interpreter "python3")
17 (require-package 'pip-requirements)
19 (when (maybe-require-package 'toml-mode)
20 (add-to-list 'auto-mode-alist '("poetry\\.lock\\'" . toml-mode)))
22 (when (maybe-require-package 'reformatter)
23 (reformatter-define black :program "black" :args '("-")))
25 (provide 'init-python)
26 ;;; init-python.el ends here