@@ -29,16 +29,51 @@ Note: The terminal feature can use `Snacks.nvim` or the native Neovim terminal.
2929
3030### Using [ lazy.nvim] ( https://github.com/folke/lazy.nvim )
3131
32+ Add the following to your plugins configuration:
33+
34+ ``` lua
35+ {
36+ " coder/claudecode.nvim" ,
37+ dependencies = {
38+ " nvim-lua/plenary.nvim" ,
39+ " folke/snacks.nvim" , -- Optional dependency for enhanced terminal
40+ },
41+ opts = {
42+ -- Configuration for claudecode main
43+ -- Optional: terminal_cmd = "claude --magic-flag",
44+
45+ -- Configuration for the interactive terminal:
46+ terminal = {
47+ split_side = " right" , -- "left" or "right"
48+ split_width_percentage = 0.3 , -- 0.0 to 1.0
49+ provider = " snacks" , -- "snacks" or "native"
50+ show_native_term_exit_tip = true , -- Show tip for Ctrl-\\ Ctrl-N
51+ },
52+ },
53+ -- The plugin will call require("claudecode").setup(opts)
54+ config = true ,
55+ -- Optional: Add convenient keymaps
56+ keys = {
57+ { " <leader>cc" , " <cmd>ClaudeCode<cr>" , desc = " Toggle Claude Terminal" },
58+ { " <leader>ck" , " <cmd>ClaudeCodeSend<cr>" , desc = " Send to Claude Code" },
59+ { " <leader>co" , " <cmd>ClaudeCodeOpen<cr>" , desc = " Open Claude Terminal" },
60+ { " <leader>cx" , " <cmd>ClaudeCodeClose<cr>" , desc = " Close Claude Terminal" },
61+ },
62+ }
63+ ```
64+
65+ For those who prefer a function-style config:
66+
3267``` lua
3368{
3469 " coder/claudecode.nvim" ,
3570 dependencies = {
3671 " nvim-lua/plenary.nvim" ,
37- " folke/snacks.nvim" , -- Added dependency
72+ " folke/snacks.nvim" , -- Optional dependency
3873 },
3974 config = function ()
40- -- Ensure snacks is loaded if you want to use the terminal immediately
41- -- require("snacks") -- Or handle this in your init.lua
75+ -- If using snacks, ensure it's loaded
76+ -- require("snacks")
4277 require (" claudecode" ).setup ({
4378 -- Optional configuration
4479 })
5388 " coder/claudecode.nvim" ,
5489 requires = {
5590 " nvim-lua/plenary.nvim" ,
56- " folke/snacks.nvim" , -- Added dependency
91+ " folke/snacks.nvim" , -- Optional dependency
5792 },
5893 config = function ()
5994 require (" claudecode" ).setup ({
0 commit comments