diff options
author | Jesús <heckyel@hyperbola.info> | 2019-01-22 15:45:41 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-01-22 15:45:41 -0500 |
commit | ced0fe8f9ef7cd16ade900bb34393c627f6d0c69 (patch) | |
tree | 350d3a0cbb87b12a36c0dc12537c56a75a2668ae /modules/init-python.el | |
parent | d0f44d85466d7211d54e30970f29815842ff4180 (diff) | |
download | emacs-personal-ced0fe8f9ef7cd16ade900bb34393c627f6d0c69.tar.lz emacs-personal-ced0fe8f9ef7cd16ade900bb34393c627f6d0c69.tar.xz emacs-personal-ced0fe8f9ef7cd16ade900bb34393c627f6d0c69.zip |
Change directory lisp/ to modules/
FS #2
Diffstat (limited to 'modules/init-python.el')
-rw-r--r-- | modules/init-python.el | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/init-python.el b/modules/init-python.el new file mode 100644 index 0000000..cbce258 --- /dev/null +++ b/modules/init-python.el @@ -0,0 +1,43 @@ +;;; init-python.el --- .Emacs Configuration -*- lexical-binding: t -*- +;;; Commentary: +;; + +;;; Code: +;;---------------------------------------------------------------------------- +;; Python Mode +;;---------------------------------------------------------------------------- +(add-hook 'python-mode-hook + (lambda () + (setq indent-tabs-mode nil) + (setq python-indent-guess-indent-offset nil) + (setq python-indent-offset 4))) + + +;;---------------------------------------------------------------------------- +;; Jedi - Python auto-completion for Emacs +;;---------------------------------------------------------------------------- +(use-package jedi) +(setq auto-mode-alist + (append '(("SConstruct\\'" . python-mode) + ("SConscript\\'" . python-mode)) + auto-mode-alist)) + +(use-package pip-requirements) +(defun my/python-mode-stuff () + "Jedi make everything a lot easier for everybody!. +It's helps prepare jedi in Emacs." + (jedi:setup) + (define-key python-mode-map (kbd "C-]") 'jedi:goto-definition) ;goto define + (local-set-key (kbd "<f1>") 'jedi:show-doc) + (setq jedi:complete-on-dot t) ; optional + ) +;; Added Jedi-mode to python-mode +(add-hook 'python-mode-hook 'my/python-mode-stuff) +;; M-x jedi:install-server + +(provide 'init-python) + +;; Local Variables: +;; byte-compile-warnings: (not free-vars) +;; End: +;;; init-python.el ends here |