From 355dae034de885e14221c943012b94b8335ba853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Fri, 17 May 2019 11:12:35 -0500 Subject: fix elpy: Emacs Python Development Environment --- modules/init-python.el | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'modules/init-python.el') 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)) -- cgit v1.2.3