Merge pull request #667 from toctan/anaconda
Add anaconda-mode for python
This commit is contained in:
commit
8cf9acc155
1 changed files with 9 additions and 0 deletions
|
@ -33,6 +33,12 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(prelude-require-package 'anaconda-mode)
|
||||||
|
|
||||||
|
(when (boundp 'company-backends)
|
||||||
|
(prelude-require-package 'company-anaconda)
|
||||||
|
(add-to-list 'company-backends 'company-anaconda))
|
||||||
|
|
||||||
(require 'prelude-programming)
|
(require 'prelude-programming)
|
||||||
|
|
||||||
;; Copy pasted from ruby-mode.el
|
;; Copy pasted from ruby-mode.el
|
||||||
|
@ -77,6 +83,8 @@
|
||||||
(defun prelude-python-mode-defaults ()
|
(defun prelude-python-mode-defaults ()
|
||||||
"Defaults for Python programming."
|
"Defaults for Python programming."
|
||||||
(subword-mode +1)
|
(subword-mode +1)
|
||||||
|
(anaconda-mode)
|
||||||
|
(eldoc-mode)
|
||||||
(setq-local electric-layout-rules
|
(setq-local electric-layout-rules
|
||||||
'((?: . (lambda ()
|
'((?: . (lambda ()
|
||||||
(if (python-info-statement-starts-block-p)
|
(if (python-info-statement-starts-block-p)
|
||||||
|
@ -91,6 +99,7 @@
|
||||||
|
|
||||||
(add-hook 'python-mode-hook (lambda ()
|
(add-hook 'python-mode-hook (lambda ()
|
||||||
(run-hooks 'prelude-python-mode-hook)))
|
(run-hooks 'prelude-python-mode-hook)))
|
||||||
|
|
||||||
(provide 'prelude-python)
|
(provide 'prelude-python)
|
||||||
|
|
||||||
;;; prelude-python.el ends here
|
;;; prelude-python.el ends here
|
||||||
|
|
Loading…
Reference in a new issue