Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/charludo/projectmgr.nvim

Quickly switch between projects and automate startup tasks.
https://github.com/charludo/projectmgr.nvim

developer-tools lua neovim plugin

Last synced: 6 days ago
JSON representation

Quickly switch between projects and automate startup tasks.

Awesome Lists containing this project

README

        


📚 projectmgr.nvim


Quickly switch between projects and automate startup tasks



Stars


Issues


Size

 

### 📜 Features

- create a list of projects, then quickly switch between them
- automate startup and shutdown tasks for each project:
- pull from a remote when entering the project
- custom startup command and/or script
- custom shutdown command and/or script
- save and restore sessions and shada files on a per-project base
- reopen last opened project (if you exited vim from within a project)
- freely configurable, disable any unwanted feature(s)
- if you are already using [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim), this plugin will integrate with it OOTB

 

### 📽 Demo

![Demo Gif](https://raw.githubusercontent.com/charludo/media-storage/main/demo.gif)

 

### 📦 Installation

The plugin is straightforward to install, so feel free to use your favorite plugin manager, e.g.:

**Packer:**

```lua
use { 'charludo/projectmgr.nvim' }
```

**Lazy:**

```lua
{
'charludo/projectmgr.nvim',
lazy = false, -- important!
}
```

 

### ⚙️ Configuration

**projectmgr** default configuration:

```lua
{
autogit = {
enabled = false,
command = "git pull --ff-only",
},
reopen = false,
session = { enabled = true, file = "Session.vim" },
shada = { enabled = false, file = "main.shada" },
scripts = {
enabled = true,
file_startup = "startup.sh",
file_shutdown = "shutdown.sh",
},
}
```

It's a good idea to set up a key mapping to toggle the projectmgr window:

```lua
vim.api.nvim_set_keymap("n", "p", ":ProjectMgr", {})
```

 

### 🦑 Usage with `telescope.nvim`

`:ProjectMgr` (or your keybind) toggles a telescope picker with your projects. The telescope preview displays information about your project
and its current git state. (I'm very much open to adding more info here and am happy about suggestions!)

The following actions and keybinds are available:

| Key | Action |
| :---------------- | :------------------------------------------------------------------------------------------------- |
| `` | Open the project under your cursor |
| `` | Add a project. You will be asked for a name, a path, and optionally startup and shutdown commands. |
| `` / `` | Delete project under your cursor |
| `` / `` | Edit the project under your cursor |
| `` / `` | Close the window without doing anything |

 

### 🦑 Usage without `telescope.nvim`

**projectmgr** comes with a fallback window in case you aren't using `telescope.nvim`. The same actions are available.
The keybinds are slightly different: `` is replaced by just `a`, `` becomes just `q`, and so on.