Skip to content

Instantly share code, notes, and snippets.

@guidoschmidt
Created November 19, 2017 09:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guidoschmidt/4457934dc61227550d0ce63674a6d914 to your computer and use it in GitHub Desktop.
Save guidoschmidt/4457934dc61227550d0ce63674a6d914 to your computer and use it in GitHub Desktop.
Emacs python setup
;;; 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