Skip to content

Commit 2628a71

Browse files
committed
feat(ci): add luacov-console and enhance installation docs
Change-Id: I3abc69e155626de7dd62cba678893cb264ef3502 Signed-off-by: Thomas Kosiewski <[email protected]>
1 parent f7c7b85 commit 2628a71

File tree

3 files changed

+48
-42
lines changed

3 files changed

+48
-42
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
luarocks install busted
4242
luarocks install luacov
4343
luarocks install luacov-reporter-lcov
44+
luarocks install luacov-console
4445
4546
- name: Run Luacheck
4647
run: luacheck lua/ tests/ --no-unused-args --no-max-line-length

README.md

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
3234
```lua
3335
{
3436
"coder/claudecode.nvim",
3537
dependencies = {
3638
"nvim-lua/plenary.nvim",
37-
"folke/snacks.nvim", -- Added dependency
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+
67+
```lua
68+
{
69+
"coder/claudecode.nvim",
70+
dependencies = {
71+
"nvim-lua/plenary.nvim",
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
})
@@ -53,7 +88,7 @@ use {
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({
@@ -63,44 +98,6 @@ use {
6398
}
6499
```
65100

66-
### Using [LazyVim](https://github.com/LazyVim/LazyVim)
67-
68-
Add the following to your `lua/plugins/claudecode.lua`:
69-
70-
```lua
71-
return {
72-
{
73-
"coder/claudecode.nvim",
74-
dependencies = {
75-
"nvim-lua/plenary.nvim",
76-
"folke/snacks.nvim", -- Added dependency
77-
},
78-
opts = {
79-
-- Optional configuration for claudecode main
80-
-- Example:
81-
-- terminal_cmd = "claude --magic-flag",
82-
83-
-- Configuration for the interactive terminal can also be nested here:
84-
terminal = {
85-
split_side = "left", -- "left" or "right"
86-
split_width_percentage = 0.4, -- 0.0 to 1.0
87-
provider = "snacks", -- "snacks" or "native" (defaults to "snacks")
88-
show_native_term_exit_tip = true, -- Show tip for Ctrl-\\ Ctrl-N (defaults to true)
89-
},
90-
},
91-
-- The main require("claudecode").setup(opts) will handle passing
92-
-- opts.terminal to the terminal module's setup.
93-
config = true, -- or function(_, opts) require("claudecode").setup(opts) end
94-
keys = {
95-
{ "<leader>cc", "<cmd>ClaudeCode<cr>", desc = "Toggle Claude Terminal" },
96-
{ "<leader>ck", "<cmd>ClaudeCodeSend<cr>", desc = "Send to Claude Code" },
97-
{ "<leader>co", "<cmd>ClaudeCodeOpen<cr>", desc = "Open Claude Terminal" },
98-
{ "<leader>cx", "<cmd>ClaudeCodeClose<cr>", desc = "Close Claude Terminal" },
99-
},
100-
},
101-
}
102-
```
103-
104101
### Local Development with LazyVim
105102

106103
For local development with LazyVim, create a `lua/plugins/claudecode.lua` file with the following content:

tests/integration/basic_spec.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
local assert = require("luassert")
2+
3+
describe("Claudecode Integration", function()
4+
it("should pass placeholder test", function()
5+
-- Simple placeholder test that will always pass
6+
assert.is_true(true)
7+
end)
8+
end)

0 commit comments

Comments
 (0)