### Install codecompanion-ui.nvim with lazy.nvim Source: https://github.com/mrjones2014/codecompanion-ui.nvim/blob/master/README.md Register codecompanion-ui.nvim as a CodeCompanion extension using lazy.nvim. Includes optional but recommended render-markdown.nvim for markdown highlighting. ```lua return { 'olimorris/codecompanion.nvim', dependencies = { 'mrjones2014/codecompanion-ui.nvim', { -- optional, but highly recommended -- `render-markdown.nvim` will auto-attach to lazy.nvim `ft` filetypes 'MeanderingProgrammer/render-markdown.nvim', ft = { 'codecompanion', 'codecompanion_input' }, }, }, opts = { extensions = { ui = { enabled = true, -- the default settings are shown here; -- you only need to specify non-default options opts = { input = { height = 10, -- Placeholder shown when the input buffer is empty placeholder = 'Type your message...', -- set to `{}` to disable, -- see `./lua/codecompanion-ui/components.lua` -- for built in components and their options. -- feel free to put up a PR with more components! winbar = { { component = 'mode', display_names = {}, icons = { default = '󰺴', acceptEdits = '󱐋', plan = '󰙬', dontAsk = '󰝟', bypassPermissions = '', }, }, { component = 'adapter' }, { component = 'model' }, { component = 'spinner', interval_ms = 100, frames = { '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' }, text = 'Processing...', }, '%=', -- shows some status messages from the plugin briefly -- I recommend keeping this enabled { component = 'messages' }, }, }, chat = { -- Chat window width as a fraction of the screen (0.0-1.0) width = 0.35, -- Winbar for the chat (output) window. -- Same format as input.winbar. winbar = { winbar = { { component = 'chat_title', icon = '󰭹', default = '[No Title]', }, }, }, }, }, }, }, }, } ``` -------------------------------- ### Example chat window winbar configuration Source: https://github.com/mrjones2014/codecompanion-ui.nvim/blob/master/README.md Configure the winbar for the chat window with a title and a spinner component. ```lua return { chat = { winbar = { { component = 'chat_title' }, '%=', { component = 'spinner' }, }, }, } ``` -------------------------------- ### Create a custom winbar component Source: https://github.com/mrjones2014/codecompanion-ui.nvim/blob/master/README.md Define a custom winbar component using a Lua function. The function should return a CcuiComponentResult table or a plain string. ```lua local custom_component = { component = function(chat) ---@type CcuiComponentResult return { text = 'my text', hl = 'Title' } end, } ``` -------------------------------- ### Override component colors Source: https://github.com/mrjones2014/codecompanion-ui.nvim/blob/master/README.md Customize the foreground and background colors of a winbar component using hex color codes. ```lua -- Use custom colors local adapter_with_custom_colors = { component = 'adapter', fg = '#61afef', bg = '#282c34' } ``` -------------------------------- ### Override component highlight group Source: https://github.com/mrjones2014/codecompanion-ui.nvim/blob/master/README.md Customize the appearance of a winbar component by specifying a named highlight group. ```lua -- Use a named highlight group local model_with_custom_hl = { component = 'model', hl = 'Special' } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.