summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--lisp/init-python.el11
2 files changed, 12 insertions, 0 deletions
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))