mirror of
https://github.com/tomru/nvim.git
synced 2026-03-03 06:27:14 +01:00
68 lines
1.6 KiB
Lua
68 lines
1.6 KiB
Lua
return {
|
|
'folke/sidekick.nvim',
|
|
opts = {
|
|
-- add any options here
|
|
cli = {
|
|
mux = {
|
|
backend = 'tmux',
|
|
enabled = true,
|
|
},
|
|
},
|
|
},
|
|
-- stylua: ignore
|
|
keys = {
|
|
{
|
|
"<c-y>",
|
|
function()
|
|
if not require('sidekick').nes_jump_or_apply() then
|
|
return "<c-y>"
|
|
end
|
|
end,
|
|
expr = true,
|
|
desc = "Goto/Apply Next Edit Suggestion"
|
|
},
|
|
{
|
|
"<leader>aa",
|
|
function() require("sidekick.cli").toggle() end,
|
|
desc = "Sidekick Toggle CLI",
|
|
},
|
|
{
|
|
"<leader>as",
|
|
function() require("sidekick.cli").select() end,
|
|
-- Or to select only installed tools:
|
|
-- require("sidekick.cli").select({ filter = { installed = true } })
|
|
desc = "Select CLI",
|
|
},
|
|
{
|
|
"<leader>at",
|
|
function() require("sidekick.cli").send({ msg = "{this}" }) end,
|
|
mode = { "x", "n" },
|
|
desc = "Send This",
|
|
},
|
|
{
|
|
"<leader>av",
|
|
function() require("sidekick.cli").send({ msg = "{selection}" }) end,
|
|
mode = { "x" },
|
|
desc = "Send Visual Selection",
|
|
},
|
|
{
|
|
"<leader>ap",
|
|
function() require("sidekick.cli").prompt() end,
|
|
mode = { "n", "x" },
|
|
desc = "Sidekick Select Prompt",
|
|
},
|
|
{
|
|
"<c-.>",
|
|
function() require("sidekick.cli").focus() end,
|
|
mode = { "n", "x", "i", "t" },
|
|
desc = "Sidekick Switch Focus",
|
|
},
|
|
-- Example of a keybinding to open Claude directly
|
|
{
|
|
"<leader>ac",
|
|
function() require("sidekick.cli").toggle({ name = "claude", focus = true }) end,
|
|
desc = "Sidekick Toggle Claude",
|
|
},
|
|
},
|
|
}
|