blob: 557a232514ce8c63bf1afeff43ce3038ea132baf (
plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
;;; init-python.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;;; Code:
;;----------------------------------------------------------------------------
;; Python Mode
;;----------------------------------------------------------------------------
(add-hook 'python-mode-hook
(lambda ()
(setq indent-tabs-mode nil)
(setq python-indent-guess-indent-offset nil)
(setq python-indent-offset 4)))
(use-package python
:mode ("\\.py" . python-mode)
:config
(use-package elpy
:init
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
:config
(setq elpy-rpc-backend "jedi")
:bind (:map elpy-mode-map
("M-." . elpy-goto-definition)
("M-," . pop-tag-mark)))
(elpy-enable))
(setq auto-mode-alist
(append '(("SConstruct\\'" . python-mode)
("SConscript\\'" . python-mode))
auto-mode-alist))
(use-package pip-requirements
:hook
(pip-requirements-mode-hook . pip-requirements-auto-complete-setup))
(use-package py-autopep8)
(use-package pyvenv)
(provide 'init-python)
;; Local Variables:
;; byte-compile-warnings: (not free-vars)
;; End:
;;; init-python.el ends here
|