diff --git a/lua/astrocommunity/completion/codeium-nvim/init.lua b/lua/astrocommunity/completion/codeium-nvim/init.lua index 05c080133..5ddce1bbc 100644 --- a/lua/astrocommunity/completion/codeium-nvim/init.lua +++ b/lua/astrocommunity/completion/codeium-nvim/init.lua @@ -1,45 +1,44 @@ return { - { - "Exafunction/codeium.nvim", - event = "User AstroFile", - cmd = "Codeium", - opts = { - enable_chat = true, - }, - dependencies = { - { - "AstroNvim/astroui", - ---@type AstroUIOpts - opts = { - icons = { - Codeium = "", - }, + "Exafunction/codeium.nvim", + event = "User AstroFile", + cmd = "Codeium", + opts = { + enable_chat = true, + }, + dependencies = { + { + "AstroNvim/astroui", + ---@type AstroUIOpts + opts = { + icons = { + Codeium = "", }, }, - { - "AstroNvim/astrocore", - ---@param opts AstroCoreOpts - opts = function(_, opts) - return require("astrocore").extend_tbl(opts, { - mappings = { - n = { - [";"] = { - name = require("astroui").get_icon("Codeium", 1, true) .. "Codeium", - }, - [";o"] = { - desc = "Open Chat", - function() vim.cmd "Codeium Chat" end, - }, + }, + { + "AstroNvim/astrocore", + ---@param opts AstroCoreOpts + opts = function(_, opts) + return require("astrocore").extend_tbl(opts, { + mappings = { + n = { + [";"] = { + name = require("astroui").get_icon("Codeium", 1, true) .. "Codeium", + }, + [";o"] = { + desc = "Open Chat", + function() vim.cmd "Codeium Chat" end, }, }, - }) - end, - }, + }, + }) + end, }, + }, + specs = { { "hrsh7th/nvim-cmp", optional = true, - dependencies = { "Exafunction/codeium.nvim" }, opts = function(_, opts) -- Inject codeium into cmp sources, with high priority table.insert(opts.sources, 1, { @@ -54,9 +53,8 @@ return { optional = true, -- Adds icon for codeium using lspkind opts = function(_, opts) - opts.symbol_map = { - Codeium = require("astroui").get_icon("Codeium", 1, true), - } + if not opts.symbol_map then opts.symbol_map = {} end + opts.symbol_map.Codeium = require("astroui").get_icon("Codeium", 1, true) end, }, },