diff options
author | Jesús <heckyel@hyperbola.info> | 2018-10-02 16:15:00 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2018-10-02 16:15:00 -0500 |
commit | d4c43d0417d92f05e790d50e54c6cd532e504ee8 (patch) | |
tree | dea1ad8e9985bb19d9ac8587454a19f653c2d250 /lisp | |
parent | 0460442c24a0331ab1e05301f67d424bb1d3686f (diff) | |
download | emacs-personal-d4c43d0417d92f05e790d50e54c6cd532e504ee8.tar.lz emacs-personal-d4c43d0417d92f05e790d50e54c6cd532e504ee8.tar.xz emacs-personal-d4c43d0417d92f05e790d50e54c6cd532e504ee8.zip |
Added Jedi - Python auto-completion for Emacs
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-python.el | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lisp/init-python.el b/lisp/init-python.el index eee16f7..fcb3c39 100644 --- a/lisp/init-python.el +++ b/lisp/init-python.el @@ -7,4 +7,26 @@ (setq python-indent-guess-indent-offset nil) (setq python-indent-offset 4))) + +;;---------------------------------------------------------------------------- +;; Jedi - Python auto-completion for Emacs +;;---------------------------------------------------------------------------- +(require-package 'jedi) +(setq auto-mode-alist + (append '(("SConstruct\\'" . python-mode) + ("SConscript\\'" . python-mode)) + auto-mode-alist)) + +(require-package 'pip-requirements) +(defun my/python-mode-stuff () + ;; Jedi makes everything a lot easier for everybody! + (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) |