Setup Python

This commit is contained in:
Vladan Popovic 2019-12-08 21:51:17 +01:00
parent 61d7451aa2
commit 1263e29b8b
3 changed files with 43 additions and 0 deletions

2
.gitignore vendored
View file

@ -2,3 +2,5 @@
elpa/ elpa/
transient/ transient/
history history
ac-comphist.dat
elpy/

15
init.el
View file

@ -16,9 +16,24 @@
(require 'jenga-helm) (require 'jenga-helm)
(require 'jenga-magit) (require 'jenga-magit)
(require 'jenga-org) (require 'jenga-org)
(require 'jenga-python)
(require 'jenga-theme) (require 'jenga-theme)
;; Custom languages and highlighting ;; Custom languages and highlighting
(require 'jenga-elm) (require 'jenga-elm)
(require 'jenga-rust) (require 'jenga-rust)
(require 'jenga-systemd) (require 'jenga-systemd)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
(ein-mumamo yasnippet use-package racer material-theme magit lsp-ui helm flycheck-rust elm-mode company-lsp cargo))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

26
modules/jenga-python.el Normal file
View file

@ -0,0 +1,26 @@
;;;; Python configuration.
(require 'jenga-functions)
(instl 'elpy)
(instl 'jupyter)
(instl 'ein)
(instl 'py-autopep8)
(instl 'yasnippet)
(elpy-enable)
(add-hook 'elpy-mode-hook 'py-autopep8-enable-on-save)
;; Enable Flycheck
(when (require 'flycheck nil t)
(setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
(add-hook 'elpy-mode-hook 'flycheck-mode))
;; Use IPython for REPL
(setq python-shell-interpreter "jupyter"
python-shell-interpreter-args "console --simple-prompt"
python-shell-prompt-detect-failure-warning nil)
(add-to-list 'python-shell-completion-native-disabled-interpreters
"jupyter")
(provide 'jenga-python)