Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ extensions = {'quickfix'}
- assistant
- avante
- chadtree
- copilot-chat
- ctrlspace
- fern
- fugitive
Expand Down
24 changes: 24 additions & 0 deletions lua/lualine/extensions/copilot-chat.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-- MIT license, see LICENSE for more details.
-- extension for CopilotC-Nvim/CopilotChat.nvim

local M = {}

local function get_copilotchat_model_name()
local ok, cc_config = pcall(require, 'CopilotChat.config')
if ok and type(cc_config.model) == "string" and cc_config.model then
return cc_config.model
else
vim.notify("CopilotChat model name unavailable", vim.log.levels.WARN)
return "LLM: N/A"
end
end

M.sections = {
lualine_a = { 'filetype' },
lualine_b = { get_copilotchat_model_name },
lualine_z = { 'mode' }
}

M.filetypes = { 'copilot-chat' }

return M