parent
3dd0dae028
commit
ca22ba0f65
14
README.md
14
README.md
@ -51,8 +51,16 @@ Neotree comes by default in combination with all-the-icons.
|
|||||||
So pressing `[f8]` will display (you must give "yes") a one-time screen to install all-the-icons fonts.
|
So pressing `[f8]` will display (you must give "yes") a one-time screen to install all-the-icons fonts.
|
||||||
|
|
||||||
### Mode Python
|
### Mode Python
|
||||||
- Require installed virtualenv, example:
|
- Require installed virtualenv:
|
||||||
|
|
||||||
`pacman -S python-virtualenv`
|
pacman -S python-virtualenv
|
||||||
|
|
||||||
`M-x jedi:install-server [RET]`
|
- Enable or disable pyvenv-mode: <kdb>M-x</kdb> pyvenv-mode
|
||||||
|
|
||||||
|
- To create virtualenv from emacs:
|
||||||
|
|
||||||
|
pyvenv-create
|
||||||
|
|
||||||
|
- To activate virtualenv from emacs:
|
||||||
|
|
||||||
|
pyvenv-activate
|
||||||
|
@ -12,28 +12,30 @@
|
|||||||
(setq python-indent-guess-indent-offset nil)
|
(setq python-indent-guess-indent-offset nil)
|
||||||
(setq python-indent-offset 4)))
|
(setq python-indent-offset 4)))
|
||||||
|
|
||||||
|
(use-package python
|
||||||
;;----------------------------------------------------------------------------
|
:mode ("\\.py" . python-mode)
|
||||||
;; Jedi - Python auto-completion for Emacs
|
:config
|
||||||
;;----------------------------------------------------------------------------
|
(use-package elpy
|
||||||
(use-package jedi)
|
:init
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.py$" . python-mode))
|
||||||
|
:config
|
||||||
|
(setq elpy-rpc-backend "jedi")
|
||||||
|
:bind (:map elpy-mode-map
|
||||||
|
("M-." . elpy-goto-definition)
|
||||||
|
("M-," . pop-tag-mark)))
|
||||||
|
(elpy-enable))
|
||||||
(setq auto-mode-alist
|
(setq auto-mode-alist
|
||||||
(append '(("SConstruct\\'" . python-mode)
|
(append '(("SConstruct\\'" . python-mode)
|
||||||
("SConscript\\'" . python-mode))
|
("SConscript\\'" . python-mode))
|
||||||
auto-mode-alist))
|
auto-mode-alist))
|
||||||
|
|
||||||
(use-package pip-requirements)
|
(use-package pip-requirements
|
||||||
(defun my/python-mode-stuff ()
|
:config
|
||||||
"Jedi make everything a lot easier for everybody!.
|
(add-hook 'pip-requirements-mode-hook #'pip-requirements-auto-complete-setup))
|
||||||
It's helps prepare jedi in Emacs."
|
|
||||||
(jedi:setup)
|
(use-package py-autopep8)
|
||||||
(define-key python-mode-map (kbd "C-]") 'jedi:goto-definition) ;goto define
|
|
||||||
(local-set-key (kbd "<f1>") 'jedi:show-doc)
|
(use-package pyvenv)
|
||||||
(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