Skip to content

A tiny neovim plugin for automatically switching to the correct pipenv for the open buffer

License

Notifications You must be signed in to change notification settings

jpfender/pipenv.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pipenv.nvim

A tiny neovim plugin for automatically switching to the correct pipenv for the open buffer.

Installation

use({
    "jpfender/pipenv.nvim",
    requires = "nvim-lua/plenary.nvim",
})

Usage

Call

require("pipenv").set_pipenv()

to set the venv of the current buffer to the associated pipenv (according to the output of pipenv --venv in the buffer's CWD).

To switch venvs automatically whenever you open or switch to a buffer, use an autocmd:

vim.api.nvim_create_autocmd("BufEnter", {
	callback = function()
		require("pipenv").set_pipenv()
	end,
})

To show the venv for the current buffer, call:

require("pipenv").get_current_venv()

Lualine component

This plugin includes a lualine component called pipenv which echoes the current venv. Sample usage:

lualine_x = { { "pipenv", icon = "" }, "encoding", "fileformat", "filetype" },

Requirements

About

A tiny neovim plugin for automatically switching to the correct pipenv for the open buffer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages