summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ravi-init-python.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/ravi-init-python.el b/lisp/ravi-init-python.el
index ba37dc6..7993092 100644
--- a/lisp/ravi-init-python.el
+++ b/lisp/ravi-init-python.el
@@ -103,6 +103,21 @@
basic-server-args))
(jedi:setup)))
+ ;; Override pos-tip support to automatically delete tooltip
+ (defun ravi/jedi:tooltip-show (string)
+ (cond
+ ((and (memq 'pos-tip jedi:tooltip-method) window-system
+ (featurep 'pos-tip))
+ (pos-tip-show (jedi:string-fill-paragraph string)
+ 'popup-tip-face nil nil 5))
+ ((and (memq 'popup jedi:tooltip-method)
+ (featurep 'popup))
+ (popup-tip string))
+ (t (when (stringp string)
+ (let ((message-log-max nil))
+ (message string))))))
+ (fset 'jedi:tooltip-show 'ravi/jedi:tooltip-show)
+
(defun ravi/python-jedi-hook-installer ()
;; (setq jedi:complete-on-dot t) ; needs auto-complete
(add-hook 'hack-local-variables-hook 'ravi/jedi-setup nil t))