aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2019-05-17 11:12:35 -0500
committerJesús <heckyel@hyperbola.info>2019-05-17 11:12:35 -0500
commit355dae034de885e14221c943012b94b8335ba853 (patch)
tree12456753396526881e480d30e8bda27b56d0b581
parent927f99cb154771e5013386b09be9dc6a4637d514 (diff)
downloademacs-personal-355dae034de885e14221c943012b94b8335ba853.tar.lz
emacs-personal-355dae034de885e14221c943012b94b8335ba853.tar.xz
emacs-personal-355dae034de885e14221c943012b94b8335ba853.zip
fix elpy: Emacs Python Development Environment
-rw-r--r--modules/init-python.el24
1 files changed, 14 insertions, 10 deletions
diff --git a/modules/init-python.el b/modules/init-python.el
index 557a232..b2800d6 100644
--- a/modules/init-python.el
+++ b/modules/init-python.el
@@ -13,17 +13,21 @@
(setq python-indent-offset 4)))
(use-package python
- :mode ("\\.py" . python-mode)
+ :mode
+ ("\\.py" . python-mode))
+
+(use-package elpy
+ :init
+ (advice-add 'python-mode :before 'elpy-enable)
+ :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 elpy-rpc-backend "jedi")
+ :bind
+ (:map elpy-mode-map
+ ("M-." . elpy-goto-definition)
+ ("M-," . pop-tag-mark)))
+
(setq auto-mode-alist
(append '(("SConstruct\\'" . python-mode)
("SConscript\\'" . python-mode))