Skip to content

Commit ec9fd8c

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 ec9fd8c

File tree

3 files changed

+48
-4
lines changed

3 files changed

+48
-4
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 & 4 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+
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
})
@@ -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({

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)