From 1f35aa39baef44c207d2b41d6db45b68c7ef1888 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Tue, 30 Sep 2025 20:07:43 +0000 Subject: [PATCH] added sidekick --- lua/plugins/lsp.lua | 3 ++- lua/plugins/sidekick.lua | 55 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/sidekick.lua diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index b74f7ad..bd208e6 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -39,7 +39,8 @@ return { lazy = false, config = function() local servers = { - 'pyrefly', + 'copilot', + 'basedpyright', 'ruff', 'clangd', 'lua_ls', diff --git a/lua/plugins/sidekick.lua b/lua/plugins/sidekick.lua new file mode 100644 index 0000000..df5251d --- /dev/null +++ b/lua/plugins/sidekick.lua @@ -0,0 +1,55 @@ +return { + 'folke/sidekick.nvim', + opts = { + -- add any options here + cli = { + mux = { + backend = 'copilot', + enabled = true, + }, + }, + }, + keys = { + { + '', + function() + -- if there is a next edit, jump to it, otherwise apply it if any + if not require('sidekick').nes_jump_or_apply() then + return '' -- fallback to normal tab + end + end, + expr = true, + desc = 'Goto/Apply Next Edit Suggestion', + }, + { + '', + function() require('sidekick.cli').focus() end, + mode = { 'n', 'x', 'i', 't' }, + desc = 'Sidekick Switch Focus', + }, + { + 'aa', + function() require('sidekick.cli').toggle({ focus = true }) end, + desc = 'Sidekick Toggle CLI', + mode = { 'n', 'v' }, + }, + { + 'ac', + function() require('sidekick.cli').toggle({ name = 'copilot', focus = true }) end, + desc = 'Sidekick Claude Toggle', + mode = { 'n', 'v' }, + }, + { + 'ag', + function() require('sidekick.cli').toggle({ name = 'grok', focus = true }) end, + desc = 'Sidekick Grok Toggle', + mode = { 'n', 'v' }, + }, + { + 'ap', + function() require('sidekick.cli').select_prompt() end, + desc = 'Sidekick Ask Prompt', + mode = { 'n', 'v' }, + }, + }, +}