From 23a4117711422fff6a383f102e92249fbdc9d240 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Fri, 21 Nov 2014 23:42:46 -0500 Subject: Install and setup jedi --- .gitignore | 1 + lisp/init-python.el | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 85ce084..1529637 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ vendor /tramp /abbrev_defs /.org-id-locations +/.python-environments diff --git a/lisp/init-python.el b/lisp/init-python.el index 803fe35..45e899b 100644 --- a/lisp/init-python.el +++ b/lisp/init-python.el @@ -1,3 +1,12 @@ +(require-package 'auto-complete) +(require-package 'jedi) + +(add-hook 'python-mode-hook 'jedi:setup) +(add-hook 'python-mode-hook 'auto-complete-mode) + +(setq jedi:tooltip-method nil + ac-auto-start nil) + ;; http://www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc5 (defun km/setup-ipython-shell () (interactive) @@ -101,6 +110,8 @@ This is inspired by `ess-eval-function-or-paragraph-and-step'." (define-key python-mode-map (kbd "C-c C-.") 'km/python-shell-send-buffer-up-to-point) + (key-chord-define python-mode-map ";w" 'auto-complete) + ;; Swap `python-shell-send-defun' and `python-eldoc-at-point'. (define-key python-mode-map (kbd "C-c C-f") 'python-shell-send-defun) (define-key python-mode-map (kbd "C-M-x") 'python-eldoc-at-point)) -- cgit v1.2.3