-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathsidekick.lua
More file actions
47 lines (47 loc) · 1.06 KB
/
sidekick.lua
File metadata and controls
47 lines (47 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
return {
"folke/sidekick.nvim",
opts = {
cli = {
win = {
split = {
width = 0.4,
},
},
-- mux = {
-- backend = "tmux",
-- enabled = true,
-- },
tools = {
claude = { cmd = { "claude", "--dangerously-skip-permissions" } },
gemini = { cmd = { "gemini", "--yolo" } },
},
},
},
keys = {
{
"<D-r>",
function()
require("sidekick.cli").toggle("pi")
end,
desc = "Toggle AI window",
mode = { "n", "t", "i", "x" },
},
{
"<D-e>",
function()
local win = vim.api.nvim_get_current_win()
local width = vim.api.nvim_win_get_width(win)
local total = vim.o.columns
if width > total * 0.8 then
-- Restore to 40%
vim.api.nvim_win_set_width(win, math.floor(total * 0.4))
else
-- Maximize
vim.api.nvim_win_set_width(win, math.floor(total * 0.95))
end
end,
desc = "Toggle maximize window",
mode = { "n", "t", "i", "x" },
},
},
}