nvim: Add copilot status to lualine

This commit is contained in:
Marty Oehme 2025-06-06 16:43:25 +02:00
parent d3cdd0b30a
commit 19f3cd3457
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 10 additions and 2 deletions

View file

@ -10,6 +10,7 @@
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
"codecompanion.nvim": { "branch": "main", "commit": "73bac3b52d9b7f52e89ac6698dd7df8962f0454c" },
"conform.nvim": { "branch": "master", "commit": "a6f5bdb78caa305496357d17e962bbc4c0b392e2" },
"copilot-lualine": { "branch": "main", "commit": "6bc29ba1fcf8f0f9ba1f0eacec2f178d9be49333" },
"copilot.lua": { "branch": "master", "commit": "c1bb86abbed1a52a11ab3944ef00c8410520543d" },
"dial.nvim": { "branch": "master", "commit": "2c7e2750372918f072a20f3cf754d845e143d7c9" },
"dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" },

View file

@ -2,6 +2,7 @@ return {
{
-- NOTE: Requires manual auth with ':Copilot auth' or 'GH_COPILOT_TOKEN' set as envvar
"zbirenbaum/copilot.lua",
dependencies = { "AndreM222/copilot-lualine" },
cmd = "Copilot",
event = "InsertEnter",
opts = {

View file

@ -16,7 +16,7 @@ return {
return ""
elseif has_pynvim == 1 then
if molten_ft[vim.bo.filetype] == nil then
return ""
return ""
end
local status_ok, res = pcall(function()
return require("molten.status").kernels() ~= ""
@ -60,7 +60,13 @@ return {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { "filename" },
lualine_x = { "encoding", "fileformat", "filetype", molten },
lualine_x = {
"encoding",
{ "copilot", symbols = { status = { icons = { unknown = "", enabled = "" } } } },
"fileformat",
"filetype",
molten,
},
lualine_y = { "progress" },
lualine_z = { selectionCount, "location" },
},