Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ without leaving your editor.
- 📦 **Pre-configured for Popular Tools**: Out-of-the-box support for Claude, Gemini, Grok, Codex, Copilot CLI, and more.
- ✨ **Context-Aware Prompts**: Automatically include file content, cursor position, and diagnostics in your prompts.
- 📝 **Prompt Library**: A library of pre-defined prompts for common tasks like explaining code, fixing issues, or writing tests.
- 🔄 **Session Persistence**: Keep your CLI sessions alive with `tmux` and `zellij` integration.
- 🔄 **Session Persistence**: Keep your CLI sessions alive with `tmux`, `zellij`, and `herdr` integration.
- 📂 **Automatic File Watching**: Automatically reloads files in Neovim when they are modified by AI tools.

- **🔌 Extensible and Customizable**
Expand Down Expand Up @@ -300,6 +300,7 @@ local defaults = {
hide_ctrl_z = { "<c-z>", "blur" , mode = "nt", desc = "go back to the previous window without hiding the terminal" },
prompt = { "<c-p>", "prompt" , mode = "t" , desc = "insert prompt or context" },
stopinsert = { "<c-q>", "stopinsert", mode = "t" , desc = "enter normal mode" },
normal_cr = { "<cr>" , "insert_cr" , mode = "n" , desc = "send <cr> to the terminal and enter normal mode" },
-- Navigate windows in terminal mode. Only active when:
-- * layout is not "float"
-- * there is another window in the direction
Expand All @@ -315,19 +316,23 @@ local defaults = {
nav = nil,
},
---@class sidekick.cli.Mux
---@field backend? "tmux"|"zellij" Multiplexer backend to persist CLI sessions
---@field backend? "tmux"|"zellij"|"herdr" Multiplexer backend to persist CLI sessions
mux = {
backend = vim.env.ZELLIJ and "zellij" or "tmux", -- default to tmux unless zellij is detected
backend = vim.env.HERDR_ENV == "1" and "herdr" or vim.env.ZELLIJ and "zellij" or "tmux", -- default to tmux unless herdr/zellij is detected
enabled = false,
-- terminal: new sessions will be created for each CLI tool and shown in a Neovim terminal
-- window: when run inside a terminal multiplexer, new sessions will be created in a new tab
-- split: when run inside a terminal multiplexer, new sessions will be created in a new split
-- NOTE: zellij only supports `terminal`
-- NOTE: herdr maps `window` to a tab and only supports fractional `split.size`
create = "terminal", ---@type "terminal"|"window"|"split"
split = {
vertical = true, -- vertical or horizontal split
size = 0.5, -- size of the split (0-1 for percentage)
},
-- max lines to capture when dumping a multiplexer pane for scrollback support
-- more lines means slower loading of the scrollback
dump = 2000,
},
--- Actual cli tool config is loaded from the runtime path `sk/cli/{tool}.lua` and merged with the config below.
--- For default configs, see https://github.com/folke/sidekick.nvim/tree/main/sk/cli
Expand Down Expand Up @@ -923,14 +928,14 @@ Use them together for the complete experience!

### Terminal sessions not persisting?

Make sure you have tmux or zellij installed and enable the multiplexer:
Make sure you have tmux, zellij, or Herdr installed and enable the multiplexer:

```lua
opts = {
cli = {
mux = {
enabled = true,
backend = "tmux", -- or "zellij"
backend = "tmux", -- or "zellij" / "herdr"
},
},
}
Expand Down
10 changes: 5 additions & 5 deletions doc/sidekick.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ FEATURES *sidekick.nvim-sidekick.nvim-features*
- **Pre-configured for Popular Tools**: Out-of-the-box support for Claude, Gemini, Grok, Codex, Copilot CLI, and more.
- **Context-Aware Prompts**: Automatically include file content, cursor position, and diagnostics in your prompts.
- **Prompt Library**: A library of pre-defined prompts for common tasks like explaining code, fixing issues, or writing tests.
- **Session Persistence**: Keep your CLI sessions alive with `tmux` and `zellij` integration.
- **Session Persistence**: Keep your CLI sessions alive with `tmux`, `zellij`, and `herdr` integration.
- **Automatic File Watching**: Automatically reloads files in Neovim when they are modified by AI tools.
- **Extensible and Customizable**
- **Flexible Configuration**: Fine-tune every aspect of the plugin to your liking.
Expand Down Expand Up @@ -317,9 +317,9 @@ Default settings ~
nav = nil,
},
---@class sidekick.cli.Mux
---@field backend? "tmux"|"zellij" Multiplexer backend to persist CLI sessions
---@field backend? "tmux"|"zellij"|"herdr" Multiplexer backend to persist CLI sessions
mux = {
backend = vim.env.ZELLIJ and "zellij" or "tmux", -- default to tmux unless zellij is detected
backend = vim.env.HERDR_ENV == "1" and "herdr" or vim.env.ZELLIJ and "zellij" or "tmux", -- default to tmux unless herdr/zellij is detected
enabled = false,
-- terminal: new sessions will be created for each CLI tool and shown in a Neovim terminal
-- window: when run inside a terminal multiplexer, new sessions will be created in a new tab
Expand Down Expand Up @@ -843,14 +843,14 @@ CLI TOOLS NOT STARTING? ~

TERMINAL SESSIONS NOT PERSISTING? ~

Make sure you have tmux or zellij installed and enable the multiplexer:
Make sure you have tmux, zellij, or Herdr installed and enable the multiplexer:

>lua
opts = {
cli = {
mux = {
enabled = true,
backend = "tmux", -- or "zellij"
backend = "tmux", -- or "zellij" / "herdr"
},
},
}
Expand Down
Loading