Created
November 19, 2017 09:46
-
-
Save guidoschmidt/4457934dc61227550d0ce63674a6d914 to your computer and use it in GitHub Desktop.
Emacs python setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; python.el --- Python Language/IDE settings | |
;;; Commentary: | |
;;; Code: | |
;;; --- Python | |
(use-package elpy | |
:ensure t | |
:config | |
(setq elpy-rpc-python-command "python3") | |
(setq python-shell-interpreter "python3") | |
(defun custom-python-mode-hook () | |
(setq python-indent-offset 4) | |
(setq tab-width 4) | |
(setq indent-tabs-mode nil) | |
(elpy-enable)) | |
(add-hook 'python-mode-hook 'custom-python-mode-hook)) | |
(use-package company-jedi | |
:ensure t | |
:config | |
(defun company/python-mode-hook () | |
(push 'company-jedi company-backends)) | |
(add-hook 'python-mode-hook 'company/python-mode-hook)) | |
(provide 'python.el) | |
;;; python.el ends here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment