diff options
| author | Miquel Sabaté Solà <msabate@suse.com> | 2019-06-04 17:03:13 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <msabate@suse.com> | 2019-06-04 17:03:28 +0200 |
| commit | f00210f9a45e950fe256bd44cca7bc80600c6684 (patch) | |
| tree | a9bbc60fbd2d73ea419bce9aace8b63cd903b0d7 /emacs/init.org | |
| parent | 535e13930d81db17e5afe06b85142c5d97bc5df9 (diff) | |
| download | dotfiles-f00210f9a45e950fe256bd44cca7bc80600c6684.tar.gz dotfiles-f00210f9a45e950fe256bd44cca7bc80600c6684.zip | |
emacs: added python environment
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
Diffstat (limited to 'emacs/init.org')
| -rw-r--r-- | emacs/init.org | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/emacs/init.org b/emacs/init.org index 3af3ab1..824b3dd 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -1978,6 +1978,29 @@ And now my Go configuration. This includes stuff like the usage of =goimports=, (add-hook 'go-mode-hook 'mssola-go-mode)) #+END_SRC +** Python + +Install =elpy= as the environment for Python support: + +#+BEGIN_SRC elisp +(use-package elpy + :ensure t + :config + (advice-add 'python-mode :before 'elpy-enable) + (when (require 'flycheck nil t) + (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)) + (add-hook 'elpy-mode-hook 'flycheck-mode))) +#+END_SRC + +Automatically use =autopep8= on save: + +#+BEGIN_SRC elisp +(use-package py-autopep8 + :ensure t + :config + (add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)) +#+END_SRC + ** Rust Install =rust-mode= and add some hooks to make it friendlier. |
