feat: modify sidekick
This commit is contained in:
@@ -52,3 +52,4 @@ vim.g.gitblame_enabled = 0
|
|||||||
-- local cc = 'lunar'
|
-- local cc = 'lunar'
|
||||||
-- vim.opt.background="dark"
|
-- vim.opt.background="dark"
|
||||||
-- vim.cmd('colorscheme ' .. cc)
|
-- vim.cmd('colorscheme ' .. cc)
|
||||||
|
vim.lsp.enable = true
|
||||||
|
|||||||
@@ -1,40 +1,35 @@
|
|||||||
return {
|
return {
|
||||||
"folke/sidekick.nvim",
|
"folke/sidekick.nvim",
|
||||||
|
enabled = true,
|
||||||
opts = {
|
opts = {
|
||||||
-- add any options here
|
|
||||||
cli = {
|
cli = {
|
||||||
mux = {
|
mux = {
|
||||||
backend = "zellij",
|
backend = vim.env.ZELLIJ and "zellij" or "tmux",
|
||||||
enabled = true,
|
enabled = vim.fn.executable("zellij") == 1 or vim.fn.executable("tmux") == 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<tab>",
|
"<leader>ao",
|
||||||
function()
|
function()
|
||||||
-- if there is a next edit, jump to it, otherwise apply it if any
|
require("sidekick.cli").toggle({ focus = true })
|
||||||
if not require("sidekick").nes_jump_or_apply() then
|
|
||||||
return "<Tab>" -- fallback to normal tab
|
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
expr = true,
|
desc = "Sidekick Open",
|
||||||
desc = "Goto/Apply Next Edit Suggestion",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<c-.>",
|
"<leader>ax",
|
||||||
function()
|
function()
|
||||||
require("sidekick.cli").toggle()
|
require("sidekick.cli").hide()
|
||||||
end,
|
end,
|
||||||
desc = "Sidekick Toggle",
|
desc = "Sidekick Close",
|
||||||
mode = { "n", "t", "i", "x" },
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>aa",
|
"<leader>aa",
|
||||||
function()
|
function()
|
||||||
require("sidekick.cli").toggle()
|
require("sidekick.cli").toggle()
|
||||||
end,
|
end,
|
||||||
desc = "Sidekick Toggle CLI",
|
desc = "Sidekick Toggle",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"<leader>as",
|
"<leader>as",
|
||||||
@@ -83,13 +78,5 @@ return {
|
|||||||
mode = { "n", "x" },
|
mode = { "n", "x" },
|
||||||
desc = "Sidekick Select Prompt",
|
desc = "Sidekick Select Prompt",
|
||||||
},
|
},
|
||||||
-- Example of a keybinding to open Claude directly
|
|
||||||
{
|
|
||||||
"<leader>ac",
|
|
||||||
function()
|
|
||||||
require("sidekick.cli").toggle({ name = "claude", focus = true })
|
|
||||||
end,
|
|
||||||
desc = "Sidekick Toggle Claude",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user