@@ -51,6 +51,8 @@ Using [lazy.nvim](https://github.com/folke/lazy.nvim):
5151 keys = {
5252 { " <leader>a" , nil , desc = " AI/Claude Code" },
5353 { " <leader>ac" , " <cmd>ClaudeCode<cr>" , desc = " Toggle Claude" },
54+ { " <leader>ar" , " <cmd>ClaudeCode --resume<cr>" , desc = " Resume Claude" },
55+ { " <leader>aC" , " <cmd>ClaudeCode --continue<cr>" , desc = " Continue Claude" },
5456 { " <leader>as" , " <cmd>ClaudeCodeSend<cr>" , mode = " v" , desc = " Send to Claude" },
5557 {
5658 " <leader>as" ,
@@ -78,7 +80,9 @@ That's it! For more configuration options, see [Advanced Setup](#advanced-setup)
7880
7981## Commands
8082
81- - ` :ClaudeCode ` - Toggle the Claude Code terminal window
83+ - ` :ClaudeCode [arguments] ` - Toggle the Claude Code terminal window (arguments are passed to claude command)
84+ - ` :ClaudeCode --resume ` - Resume a previous Claude conversation
85+ - ` :ClaudeCode --continue ` - Continue Claude conversation
8286- ` :ClaudeCodeSend ` - Send current visual selection to Claude, or add files from tree explorer
8387- ` :ClaudeCodeTreeAdd ` - Add selected file(s) from tree explorer to Claude context (also available via ClaudeCodeSend)
8488- ` :ClaudeCodeAdd <file-path> [start-line] [end-line] ` - Add a specific file or directory to Claude context by path with optional line range
@@ -108,7 +112,7 @@ The `:ClaudeCodeAdd` command allows you to add files or directories directly by
108112:ClaudeCodeAdd ~/projects/myproject/
109113:ClaudeCodeAdd ./README.md
110114:ClaudeCodeAdd src/main.lua 50 100 " Lines 50-100 only
111- :ClaudeCodeAdd config.lua 25 " From line 25 to end of file
115+ :ClaudeCodeAdd config.lua 25 " Only line 25
112116```
113117
114118#### Features
@@ -132,7 +136,7 @@ The `:ClaudeCodeAdd` command allows you to add files or directories directly by
132136
133137" Add specific line ranges
134138:ClaudeCodeAdd src/main.lua 50 100 " Lines 50 through 100
135- :ClaudeCodeAdd config.lua 25 " From line 25 to end of file
139+ :ClaudeCodeAdd config.lua 25 " Only line 25
136140:ClaudeCodeAdd utils.py 1 50 " First 50 lines
137141:ClaudeCodeAdd README.md 10 20 " Just lines 10-20
138142
@@ -196,6 +200,7 @@ See [DEVELOPMENT.md](./DEVELOPMENT.md) for build instructions and development gu
196200 split_side = " right" ,
197201 split_width_percentage = 0.3 ,
198202 provider = " snacks" , -- or "native"
203+ auto_close = true , -- Auto-close terminal after command completion
199204 },
200205
201206 -- Diff options
@@ -223,6 +228,29 @@ See [DEVELOPMENT.md](./DEVELOPMENT.md) for build instructions and development gu
223228
224229</details >
225230
231+ ### Terminal Auto-Close Behavior
232+
233+ The ` auto_close ` option controls what happens when Claude commands finish:
234+
235+ ** When ` auto_close = true ` (default):**
236+
237+ - Terminal automatically closes after command completion
238+ - Error notifications shown for failed commands (non-zero exit codes)
239+ - Clean workflow for quick command execution
240+
241+ ** When ` auto_close = false ` :**
242+
243+ - Terminal stays open after command completion
244+ - Allows reviewing command output and any error messages
245+ - Useful for debugging or when you want to see detailed output
246+
247+ ``` lua
248+ terminal = {
249+ provider = " snacks" ,
250+ auto_close = false , -- Keep terminal open to review output
251+ }
252+ ```
253+
226254## Troubleshooting
227255
228256- ** Claude not connecting?** Check ` :ClaudeCodeStatus ` and verify lock file exists in ` ~/.claude/ide/ `
0 commit comments