Add pip-requirements package to python layer
[Pip requirements mode](https://github.com/Wilfred/pip-requirements.el) for editing pip requirement files and autocompletion of PyPI Packages by default.
This commit is contained in:
parent
32529256e5
commit
18d6c9bd5d
|
@ -13,6 +13,7 @@
|
||||||
;; variables
|
;; variables
|
||||||
|
|
||||||
(spacemacs|defvar-company-backends python-mode)
|
(spacemacs|defvar-company-backends python-mode)
|
||||||
|
(spacemacs|defvar-company-backends pip-requirements-mode)
|
||||||
|
|
||||||
(defvar python-enable-yapf-format-on-save nil
|
(defvar python-enable-yapf-format-on-save nil
|
||||||
"If non-nil, automatically format code with YAPF on save.")
|
"If non-nil, automatically format code with YAPF on save.")
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
flycheck
|
flycheck
|
||||||
helm-pydoc
|
helm-pydoc
|
||||||
hy-mode
|
hy-mode
|
||||||
|
pip-requirements
|
||||||
pony-mode
|
pony-mode
|
||||||
pyenv-mode
|
pyenv-mode
|
||||||
pyvenv
|
pyvenv
|
||||||
|
@ -58,6 +59,14 @@
|
||||||
(defadvice anaconda-mode-goto (before python/anaconda-mode-goto activate)
|
(defadvice anaconda-mode-goto (before python/anaconda-mode-goto activate)
|
||||||
(evil-jumper--push)))
|
(evil-jumper--push)))
|
||||||
|
|
||||||
|
(defun python/init-pip-requirements ()
|
||||||
|
(use-package pip-requirements
|
||||||
|
:init
|
||||||
|
(when (configuration-layer/layer-usedp 'auto-completion)
|
||||||
|
(push '(company-capf :with company-yasnippet)
|
||||||
|
company-backends-pip-requirements-mode)
|
||||||
|
(spacemacs|add-company-hook pip-requirements-mode))))
|
||||||
|
|
||||||
(defun python/init-pony-mode ()
|
(defun python/init-pony-mode ()
|
||||||
(use-package pony-mode
|
(use-package pony-mode
|
||||||
:defer t
|
:defer t
|
||||||
|
|
Loading…
Reference in a new issue