Added Jedi - Python auto-completion for Emacs
This commit is contained in:
parent
0460442c24
commit
d4c43d0417
@ -7,4 +7,26 @@
|
|||||||
(setq python-indent-guess-indent-offset nil)
|
(setq python-indent-guess-indent-offset nil)
|
||||||
(setq python-indent-offset 4)))
|
(setq python-indent-offset 4)))
|
||||||
|
|
||||||
|
|
||||||
|
;;----------------------------------------------------------------------------
|
||||||
|
;; Jedi - Python auto-completion for Emacs
|
||||||
|
;;----------------------------------------------------------------------------
|
||||||
|
(require-package 'jedi)
|
||||||
|
(setq auto-mode-alist
|
||||||
|
(append '(("SConstruct\\'" . python-mode)
|
||||||
|
("SConscript\\'" . python-mode))
|
||||||
|
auto-mode-alist))
|
||||||
|
|
||||||
|
(require-package 'pip-requirements)
|
||||||
|
(defun my/python-mode-stuff ()
|
||||||
|
;; Jedi makes everything a lot easier for everybody!
|
||||||
|
(jedi:setup)
|
||||||
|
(define-key python-mode-map (kbd "C-]") 'jedi:goto-definition) ;goto define
|
||||||
|
(local-set-key (kbd "<f1>") 'jedi:show-doc)
|
||||||
|
(setq jedi:complete-on-dot t) ; optional
|
||||||
|
)
|
||||||
|
;; Added Jedi-mode to python-mode
|
||||||
|
(add-hook 'python-mode-hook 'my/python-mode-stuff)
|
||||||
|
;; M-x jedi:install-server
|
||||||
|
|
||||||
(provide 'init-python)
|
(provide 'init-python)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user