问题
I have jedi-mode installed in emacs for python editing because I find C-.
and C-,
very useful for jumping to definitions and back. Automatic auto-completion, however, is not something I want. As I try to use emacs with jedi installed, it is continually trying to jump in with suggestions and bring up popups. How can I configure jedi so that it only does things in response to specific invocations, and not in response to typing or cursor movement?
I've tried setting (setq jedi:complete-on-dot nil)
and (setq jedi:tooltip-method nil)
but these only disable some of jedi's reactive features. How do I disable all of them?
Alternatively, is there a different emacs package that would be a better choice if I mostly just want to be able to jump to definitions?
回答1:
jedi
uses auto-complete
for auto-completion, so to turn that off you need to look at the auto-complete manual:
; move quick-help tooltips to the minibuffer
(setq jedi:tooltip-method nil)
; disable all auto-completion unless explicitly invoked with M-tab
(setq ac-auto-show-menu nil)
(setq ac-auto-start nil)
(define-key ac-mode-map (kbd "M-TAB") 'auto-complete)
; start jedi
(add-hook 'python-mode-hook 'jedi:setup)
来源:https://stackoverflow.com/questions/43550507/configure-jedi-not-to-auto-complete-automatically