Skip to content

Commit

Permalink
feat(completion): add codeium-cmp plugin (#1030)
Browse files Browse the repository at this point in the history
* feat(completion): add codeium-cmp plugin

* fix(codeium-cmp): Use opts

* fix(codeium-cmp): Make nvim-cmp plugin spec optional

* feat(codeium-cmp): add key mappings

* Apply suggestions from code review

* Rename README.md to README.md

* Rename init.lua to init.lua

* Update README.md

* Update init.lua

* Update lua/astrocommunity/completion/codeium-nvim/init.lua

* Update lua/astrocommunity/completion/codeium-nvim/README.md

* Update init.lua

---------

Co-authored-by: Uzair Aftab <[email protected]>
Co-authored-by: Uzair Aftab <[email protected]>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent 585471f commit 5e6e95a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lua/astrocommunity/completion/codeium-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 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>


_Note_: You need to auth first before usage
44 changes: 44 additions & 0 deletions lua/astrocommunity/completion/codeium-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
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,
},
}

0 comments on commit 5e6e95a

Please sign in to comment.