All Projects → pwalsh → Pipenv.el

pwalsh / Pipenv.el

A Pipenv porcelain inside Emacs.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pipenv.el

Emacs Solaire Mode
If only certain buffers could be so grossly incandescent.
Stars: ✭ 129 (-8.51%)
Mutual labels:  emacs
Vscode Emacs Mcx
Awesome Emacs Keymap - VSCode emacs keybinding with multi cursor support
Stars: ✭ 135 (-4.26%)
Mutual labels:  emacs
Tron Legacy Emacs Theme
Original retro-futuristic theme inspired by Tron: Legacy
Stars: ✭ 139 (-1.42%)
Mutual labels:  emacs
Togetherly
Allow multiple clients to edit a single file on-line
Stars: ✭ 130 (-7.8%)
Mutual labels:  emacs
Nix Doom Emacs
doom-emacs packaged for Nix
Stars: ✭ 132 (-6.38%)
Mutual labels:  emacs
Flyspell Correct
Distraction-free words correction with flyspell via selected interface.
Stars: ✭ 136 (-3.55%)
Mutual labels:  emacs
Emacs Wttrin
Emacs frontend for weather web service wttr.in.
Stars: ✭ 129 (-8.51%)
Mutual labels:  emacs
Org Graph View
View Org buffers as a clickable, graphical mind-map
Stars: ✭ 141 (+0%)
Mutual labels:  emacs
Emacs Powerthesaurus
Powerthesaurus integration for Emacs
Stars: ✭ 132 (-6.38%)
Mutual labels:  emacs
Elpa
Emacs China ELPA 镜像
Stars: ✭ 137 (-2.84%)
Mutual labels:  emacs
Eval In Repl
Consistent ESS-like eval interface for various REPLs
Stars: ✭ 130 (-7.8%)
Mutual labels:  emacs
Emacs Gdscript Mode
An Emacs package to get GDScript support and syntax highlighting.
Stars: ✭ 132 (-6.38%)
Mutual labels:  emacs
Dots
Personal *nix configuration files
Stars: ✭ 136 (-3.55%)
Mutual labels:  emacs
Psc Ide Emacs
Emacs integration for PureScript's psc-ide tool.
Stars: ✭ 130 (-7.8%)
Mutual labels:  emacs
Evil Easymotion
⏩ A port of vim easymotion to Emacs' evil-mode
Stars: ✭ 140 (-0.71%)
Mutual labels:  emacs
Emacs Smart Input Source
Less manual switch for native or OS input source (input method).
Stars: ✭ 130 (-7.8%)
Mutual labels:  emacs
Magic Latex Buffer
Magical syntax highlighting for LaTeX-mode buffers
Stars: ✭ 135 (-4.26%)
Mutual labels:  emacs
Prism.el
Disperse Lisp forms (and other languages) into a spectrum of colors by depth
Stars: ✭ 141 (+0%)
Mutual labels:  emacs
Emacs Cl
Common Lisp implemented in Emacs Lisp.
Stars: ✭ 140 (-0.71%)
Mutual labels:  emacs
Nix Mode
An Emacs major mode for editing Nix expressions.
Stars: ✭ 137 (-2.84%)
Mutual labels:  emacs
  • pipenv.el

#+ATTR_HTML: :alt CircleCI image :title CircleCI [[https://circleci.com/gh/pwalsh/pipenv.el][https://circleci.com/gh/pwalsh/pipenv.el.svg?style=svg]]

[[https://melpa.org/#/pipenv][file:https://melpa.org/packages/pipenv-badge.svg]]

A [[https://pipenv.readthedocs.io/en/latest/][Pipenv]] porcelain inside Emacs.

** Overview

[[https://pipenv.readthedocs.io/en/latest/][Pipenv]] is a tool that aims to bring the best of all packaging worlds to the Python world. It manages virtual environments, adds and removes packages, and enables deterministic build dependencies.

=pipenv.el= makes Pipenv a first-class citizen in your Emacs-driven Python development workflow with a range of interactive commands wrapping the Pipenv, a minor mode to accompany =python-mode= with a keymap for the most useful commands, and a high-level =pipenv-activate= / =pipenv-deactivate= interface for virtual environment integration with your Emacs session.

** Contributing

Contributions to documentation and code are welcome. [[https://github.com/pwalsh/pipenv.el/issues/new][Open an issue]] for discussion, or [[https://github.com/pwalsh/pipenv.el/compare][submit a PR]] for consideration.

** Installation

*** Melpa

=pipenv.el= is available on [[https://melpa.org/#/pipenv][Melpa]].

*** Spacemacs

=pipenv.el= [[https://github.com/syl20bnr/spacemacs/pull/10308][has been integrated]] in the [[http://spacemacs.org/layers/+lang/python/README.html][Python layer]].

*** Manual

Download the code with [[https://github.com/pwalsh/pipenv.el.git][git]] or as a [[https://github.com/pwalsh/pipenv.el/archive/master.zip][zip]], and then put =pipenv.el= on your Emacs load path.

** Configuration

Once installed, all Pipenv commands are available to be called interactively, and are prefixed with =pipenv-=. To add the minor mode for buffers with a Python major mode, use =(add-hook 'python-mode-hook #'pipenv-mode)=.

Here is an example of configuration with =use-package=.

#+BEGIN_SRC elisp (use-package pipenv :hook (python-mode . pipenv-mode) :init (setq pipenv-projectile-after-switch-function #'pipenv-projectile-after-switch-extended)) #+END_SRC

** Features

*** Pipenv coverage

=pipenv.el= wraps the majority of the Pipenv CLI. See all commands prefixed with =pipenv-= after installation (=M-x pipenv-=).

**** =pipenv open=

=pipenv.el= reimplements Pipenv's =open= command in Emacs Lisp as =pipenv-open=, rather than shelling out to Pipenv for the logic. This is a design decision, ensuring that modules are opened in the current Emacs session, rather than in =$EDITOR= as per the Python implementation of =pipenv open=.

*** Activate and Deactivate

In addition to providing the majority of Pipenv commands, there are several custom functions available in =pipenv.el=. The most useful are =pipenv-activate= and =pipenv-deactivate=, which are used to manage the Python virtual environment for the current Emacs session.

=pipenv-activate= calls =pyvenv-activate= and sets the variable =python-shell-virtualenv-root= to that of the Pipenv project currently being visited, and =pipenv-deactivate= sets it back to the Emacs default and also calls =pyvenv-deactivate=.

*** Minor mode

The Pipenv minor mode is activated for buffers with a Python major mode. The minor mode exposes a number of key bindings for =pipenv.el= commands, prefixed by =M-p=.

  • =C-c C-p a= is bound to =pipenv-activate=
  • =C-c C-p d= is bound to =pipenv-deactivate=
  • =C-c C-p s= is bound to =pipenv-shell=
  • =C-c C-p o= is bound to =pipenv-open=
  • =C-c C-p i= is bound to =pipenv-install=
  • =C-c C-p u= is bound to =pipenv-uninstall=

*** Integrations

**** Flycheck

Integration with Flycheck is enabled by default, if Flycheck is installed. The integration customises Flycheck's =flycheck-executable-find= function to search for executables in an activate Pipenv virtual environment.

Disable Flycheck integration with:

#+BEGIN_SRC elisp (setq pipenv-with-flycheck nil) #+END_SRC

**** Projectile

Integration with Projectile is enabled by default, if Projectile is installed. The integration adds a hook to =projectile-after-switch-project-hook=, being =pipenv-projectile-after-switch-function=, which can be customized.

Disable Projectile integration with:

#+BEGIN_SRC elisp (setq pipenv-with-projectile nil) #+END_SRC

The default value for =pipenv-projectile-after-switch-function= is the function =pipenv-projectile-after-switch-default=, which simply activates the Pipenv virtual environment, if a Pipenv project is detected.

You can set your own function to =pipenv-projectile-after-switch-function= to customise this behaviour. An example function for this is included, called =pipenv-projectile-after-switch-extended=, which, in addition to setting the virtual environment, opens a Pipenv shell, and opens a Python interpreter with =run-python=.

#+BEGIN_SRC elisp (setq pipenv-projectile-after-switch-function #'pipenv-projectile-after-switch-extended) #+END_SRC **** Pyvenv

=pipenv.el= relies on [[https://stable.melpa.org/#/pyvenv/][pyvenv]] to switch between different virtual environments (=pipenv-activate= and =pipenv-deactivate=).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].