Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(completion): add codeium-cmp plugin #1030

Merged
merged 13 commits into from
Jun 10, 2024
10 changes: 10 additions & 0 deletions lua/astrocommunity/completion/codeium-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# codeium-nvim

A native neovim extension for Codeium

Usage:

- `:Codeium Auth` - to set up the plugin
- `:Codeium Chat` - Open chat in browser

**Repository**: <https://github.com/Exafunction/codeium.nvim>
Uzaaft marked this conversation as resolved.
Show resolved Hide resolved
67 changes: 67 additions & 0 deletions lua/astrocommunity/completion/codeium-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
return {
{
"Exafunction/codeium.nvim",
opts = {
enable_chat = true,
},
dependencies = {
"AstroNvim/astrocore",
---@param opts AstroCoreOpts
opts = {
mappings = {
n = {
["<Leader>;"] = {
name = " Codeium",
},
["<Leader>;o"] = {
desc = "Open Chat",
function() vim.cmd "Codeium Chat" end,
},
},
},
},
},
},
{
"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, {
name = "codeium",
group_index = 1,
priority = 10000,
})
end,
},
{
"onsails/lspkind.nvim",
optional = true,
-- Adds icon for codeium using lspkind
opts = function(_, opts) opts.symbol_map = { Codeium = "" } end,
},
{
"AstroNvim/astrocore",
---@param opts AstroCoreOpts
opts = function(_, opts)
return require("astrocore").extend_tbl(opts, {
mappings = {
n = {
["<Leader>;"] = {
name = " Codeium",
},
["<Leader>;o"] = {
desc = "Open Chat",
function() vim.cmd "Codeium Chat" end,
},
["<Leader>;a"] = {
desc = "Auth",
function() vim.cmd "Codeium Auth" end,
},
},
},
})
end,
},
Uzaaft marked this conversation as resolved.
Show resolved Hide resolved
}
Loading