馃珯 tiny scratch terminal for Neovim
1# 馃珯 jamjar.nvim
2
3> a tiny scratch terminal for Neovim
4
5jamjar gives you a persistent, toggleable scratch terminal ~pop it open, run something, close it.
6
7## requirements
8
9- Neovim `>= 0.12`
10
11## installation
12
13install with `vim.pack`:
14
15```lua
16vim.pack.add({ { src = "https://codeberg.org/comfysage/jamjar.nvim" } })
17```
18
19## usage
20
21`jamjar.make` returns a toggle function for a persistent scratch terminal:
22
23```lua
24local toggle = require("jamjar").make("main")
25
26vim.keymap.set({ "n", "t" }, "<c-space>j", toggle, { desc = "toggle scratch terminal" })
27```
28
29use the `cmd` option to run a specific command in the terminal:
30
31```lua
32local lazygit = require("jamjar").make("git", { cmd = "lazygit" })
33local tests = require("jamjar").make("tests", { cmd = { "cargo", "test" } })
34
35vim.keymap.set({ "n", "t" }, "<c-space>g", lazygit, { desc = "toggle lazygit" })
36vim.keymap.set({ "n", "t" }, "<c-space>t", tests, { desc = "toggle tests" })
37```