馃珯 tiny scratch terminal for Neovim
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Lua 100.0%
3 1 0

Clone this repository

https://tangled.org/robinwobin.dev/jamjar.nvim https://tangled.org/did:plc:khzb5upklnupwpxllpbmrv5a/jamjar.nvim
git@tangled.org:robinwobin.dev/jamjar.nvim git@tangled.org:did:plc:khzb5upklnupwpxllpbmrv5a/jamjar.nvim

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

馃珯 jamjar.nvim#

a tiny scratch terminal for Neovim

jamjar gives you a persistent, toggleable scratch terminal ~pop it open, run something, close it.

requirements#

  • Neovim >= 0.12

installation#

install with vim.pack:

vim.pack.add({ { src = "https://codeberg.org/comfysage/jamjar.nvim" } })

usage#

jamjar.make returns a toggle function for a persistent scratch terminal:

local toggle = require("jamjar").make("main")

vim.keymap.set({ "n", "t" }, "<c-space>j", toggle, { desc = "toggle scratch terminal" })

use the cmd option to run a specific command in the terminal:

local lazygit = require("jamjar").make("git", { cmd = "lazygit" })
local tests = require("jamjar").make("tests", { cmd = { "cargo", "test" } })

vim.keymap.set({ "n", "t" }, "<c-space>g", lazygit, { desc = "toggle lazygit" })
vim.keymap.set({ "n", "t" }, "<c-space>t", tests,   { desc = "toggle tests" })