summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-python.el11
1 files changed, 11 insertions, 0 deletions
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))