summary refs log tree commit diff
path: root/config/init-python.el
blob: 847304f4352e0e73a59c3ce6ddd1af8a01f09298 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
;;; init-python.el --- Configure python -*- lexical-binding: t -*-
;; Author: Franck Cuny <franck@fcuny.net>

;;; Commentary:

;; All python related things

;;; Code:

(use-package python-mode
  :hook ((python-mode . tree-sitter-hl-mode)
         (python-mode . eglot-ensure))
  :custom
  ;; if set to an absolute path, pyvenv won't work
  (python-shell-interpreter "python3"))

(use-package blacken
  :ensure t
  :hook (python-mode . blacken-mode))

(use-package pyvenv
  :ensure t
  :config
  (pyvenv-mode 1))

(provide 'init-python)

;;; init-python.el ends here