Python extension has been updated
This commit is contained in:
parent
71e212868f
commit
91b0e9b10f
|
@ -5,6 +5,8 @@
|
||||||
;; Dependencies ----------------------------------
|
;; Dependencies ----------------------------------
|
||||||
(depends-on 'anaconda-mode)
|
(depends-on 'anaconda-mode)
|
||||||
(depends-on 'company-anaconda)
|
(depends-on 'company-anaconda)
|
||||||
|
(depends-on 'virtualenvwrapper)
|
||||||
|
(depends-on 'flycheck)
|
||||||
(depends-on 'pyvenv)
|
(depends-on 'pyvenv)
|
||||||
|
|
||||||
(with-ability kivy-editor
|
(with-ability kivy-editor
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
;(require 'eldoc-mode)
|
;(require 'eldoc-mode)
|
||||||
|
|
||||||
(subword-mode +1)
|
(subword-mode +1)
|
||||||
;(anaconda-mode 1)
|
;(anaconda-mode 1)
|
||||||
(eldoc-mode 1)
|
(eldoc-mode 1)
|
||||||
|
|
||||||
(setup-keybindings)
|
(setup-keybindings)
|
||||||
|
@ -92,17 +92,23 @@
|
||||||
#'python-imenu-create-flat-index))
|
#'python-imenu-create-flat-index))
|
||||||
(add-hook 'post-self-insert-hook
|
(add-hook 'post-self-insert-hook
|
||||||
#'electric-layout-post-self-insert-function nil 'local)
|
#'electric-layout-post-self-insert-function nil 'local)
|
||||||
;(add-hook 'after-save-hook 'python-mode-set-encoding nil 'local))
|
;(add-hook 'after-save-hook 'python-mode-set-encoding nil 'local))
|
||||||
)
|
)
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun extensions/python-initialize ()
|
(defun extensions/python-initialize ()
|
||||||
(message "Initializing 'python' extension.")
|
(message "Initializing 'python' extension.")
|
||||||
|
|
||||||
|
(ability venv ()
|
||||||
|
"Virtualenv support"
|
||||||
|
(require 'virtualenvwrapper)
|
||||||
|
(venv-initialize-interactive-shells)
|
||||||
|
(venv-initialize-eshell)
|
||||||
|
)
|
||||||
(ability python-editor ()
|
(ability python-editor ()
|
||||||
"Gives FG42 the ability to edit pytho codes."
|
"Gives FG42 the ability to edit pytho codes."
|
||||||
|
|
||||||
(add-hook 'python-mode-hook 'python-mode-defaults)
|
(add-hook 'python-mode-hook 'python-mode-defaults)
|
||||||
|
(add-hook 'after-init-hook #'global-flycheck-mode)
|
||||||
(when (fboundp 'exec-path-from-shell-copy-env)
|
(when (fboundp 'exec-path-from-shell-copy-env)
|
||||||
(exec-path-from-shell-copy-env "PYTHONPATH"))
|
(exec-path-from-shell-copy-env "PYTHONPATH"))
|
||||||
|
|
||||||
|
@ -122,7 +128,7 @@
|
||||||
(ability python-code-completion ('code-completion)
|
(ability python-code-completion ('code-completion)
|
||||||
"Gives FG42 the ability to complete python codes."
|
"Gives FG42 the ability to complete python codes."
|
||||||
|
|
||||||
;(when (boundp 'company-backends)
|
;(when (boundp 'company-backends)
|
||||||
; (add-to-list 'company-backends 'company-anaconda))))
|
; (add-to-list 'company-backends 'company-anaconda))))
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue