Configure jedi not to auto-complete automatically?

蓝咒 提交于 2021-02-19 05:44:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!