-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(completion): add codeium-cmp plugin (#1030)
* 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
1 parent
585471f
commit 5e6e95a
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
} |