Skip to main content

Sidekick

info

You can enable the extra with the :LazyExtras command. Plugins marked as optional will only be configured if they are installed.

Below you can find a list of included plugins and their default settings.

caution

You don't need to copy the default settings to your config. They are only shown here for reference.

nvim-lspconfig

copilot-language-server

opts = {
servers = {
copilot = {},
},
}

sidekick.nvim

opts = function()
-- Accept inline suggestions or next edits
LazyVim.cmp.actions.ai_nes = function()
local Nes = require("sidekick.nes")
if Nes.have() and (Nes.jump() or Nes.apply()) then
return true
end
end
end

lualine.nvim (optional)

lualine

opts = function(_, opts)
local icons = {
Error = { " ", "DiagnosticError" },
Inactive = { " ", "MsgArea" },
Warning = { " ", "DiagnosticWarn" },
Normal = { LazyVim.config.icons.kinds.Copilot, "Special" },
}
table.insert(opts.sections.lualine_x, 2, {
function()
local status = require("sidekick.status").get()
return status and vim.tbl_get(icons, status.kind, 1)
end,
cond = function()
return require("sidekick.status").get() ~= nil
end,
color = function()
local status = require("sidekick.status").get()
local hl = status and (status.busy and "DiagnosticWarn" or vim.tbl_get(icons, status.kind, 2))
return { fg = Snacks.util.color(hl) }
end,
})
end