Skip to content

Commit

Permalink
feat: ✨ add codecompanion support
Browse files Browse the repository at this point in the history
  • Loading branch information
olimorris committed Jul 27, 2024
1 parent b50a73e commit c2d20cf
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ require("onedarkpro").setup({
plugins = { -- Override which plugin highlight groups are loaded
aerial = true,
barbar = true,
codecompanion = true,
copilot = true,
dashboard = true,
flash_nvim = true,
Expand Down Expand Up @@ -702,6 +703,7 @@ The theme supports the following plugins:

- [aerial.nvim](https://github.com/stevearc/aerial.nvim) (`aerial`)
- [barbar.nvim](https://github.com/romgrk/barbar.nvim) (`barbar`)
- [CodeCompanion.nvim](https://github.com/olimorris/codecompanion.nvim) (`codecompanion`)
- [Copilot.vim](https://github.com/github/copilot.vim) (`copilot`)
- [Dashboard](https://github.com/glepnir/dashboard-nvim) (`dashboard`)
- [diffview.nvim](https://github.com/sindrets/diffview.nvim) (`diffview`)
Expand Down
4 changes: 3 additions & 1 deletion doc/onedarkpro.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ Click to see the default configuration ~
plugins = { -- Override which plugin highlight groups are loaded
aerial = true,
barbar = true,
codecompanion = true,
copilot = true,
dashboard = true,
flash_nvim = true,
Expand Down Expand Up @@ -776,13 +777,14 @@ The theme supports the following plugins:

- aerial.nvim <https://github.com/stevearc/aerial.nvim> (`aerial`)
- barbar.nvim <https://github.com/romgrk/barbar.nvim> (`barbar`)
- CodeCompanion.nvim <https://github.com/olimorris/codecompanion.nvim> (`codecompanion`)
- Copilot.vim <https://github.com/github/copilot.vim> (`copilot`)
- Dashboard <https://github.com/glepnir/dashboard-nvim> (`dashboard`)
- diffview.nvim <https://github.com/sindrets/diffview.nvim> (`diffview`)
- flash.nvim <https://github.com/folke/flash.nvim> (`flash.nvim`)
- gitsigns.nvim <https://github.com/lewis6991/gitsigns.nvim> (`gitsigns`)
- Hop.nvim <https://github.com/phaazon/hop.nvim> (`hop`)
- Indent Blankline <https://github.com/lukas-reineke/indent-blankline.nvim/tree/lua> (`indentline`)
- Indent Blankline <https://github.com/lukas-reineke/indent-blankline.nvim> (`indentline`)
- leap.nvim <https://github.com/ggandor/leap.nvim> (`leap`)
- lspsaga.nvim <https://github.com/glepnir/lspsaga.nvim> (`lsp_saga`)
- LSP Semantic tokens (`lsp_semantic_tokens`)
Expand Down
1 change: 1 addition & 0 deletions lua/onedarkpro/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ local defaults = {
plugins = { -- Enable/disable specific plugins
aerial = true,
barbar = true,
codecompanion = true,
copilot = true,
dashboard = true,
diffview = true,
Expand Down
17 changes: 17 additions & 0 deletions lua/onedarkpro/highlights/plugins/codecompanion.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
local M = {}

---Get the highlight groups for the plugin
---@param theme table
---@return table
function M.groups(theme)
local config = require("onedarkpro.config").config

return {
CodeCompanionChatHeader = { fg = theme.palette.fg, bold = true },
CodeCompanionChatSeparator = { fg = theme.palette.gray },
CodeCompanionChatTool = { fg = theme.palette.bg, bg = theme.palette.green },
CodeCompanionChatVariable = { fg = theme.palette.bg, bg = theme.palette.blue },
}
end

return M

0 comments on commit c2d20cf

Please sign in to comment.