Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/charludo/projectmgr.nvim
- Owner: charludo
- License: gpl-3.0
- Created: 2022-06-16T16:29:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-26T21:09:28.000Z (about 1 year ago)
- Last Synced: 2024-02-15T13:33:31.246Z (9 months ago)
- Topics: developer-tools, lua, neovim, plugin
- Language: Lua
- Homepage: https://github.com/charludo/projectmgr.nvim
- Size: 1.55 MB
- Stars: 118
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
📚 projectmgr.nvim
Quickly switch between projects and automate startup tasks
### 📜 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.