Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions lua/astrocommunity/completion/codeium-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ return {
cmd = "Codeium",
opts = {
enable_chat = true,
virtual_text = { key_bindings = { accept = false } },
},
dependencies = {
{
Expand All @@ -20,6 +21,17 @@ return {
---@param opts AstroCoreOpts
opts = function(_, opts)
return require("astrocore").extend_tbl(opts, {
options = {
g = {
-- set the ai_accept function
ai_accept = function()
if require("codeium.virtual_text").get_current_completion_item() then
vim.api.nvim_input(require("codeium.virtual_text").accept())
return true
end
end,
},
},
mappings = {
n = {
["<Leader>;"] = {
Expand All @@ -36,6 +48,7 @@ return {
},
},
specs = {
{ import = "astrocommunity.recipes.ai" },
{
"hrsh7th/nvim-cmp",
optional = true,
Expand Down
19 changes: 0 additions & 19 deletions lua/astrocommunity/completion/copilot-lua-cmp/README.md

This file was deleted.

77 changes: 0 additions & 77 deletions lua/astrocommunity/completion/copilot-lua-cmp/init.lua

This file was deleted.

25 changes: 24 additions & 1 deletion lua/astrocommunity/completion/copilot-lua/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,28 @@ return {
"zbirenbaum/copilot.lua",
cmd = "Copilot",
event = "User AstroFile",
opts = { suggestion = { auto_trigger = true, debounce = 150 } },
opts = { suggestion = {
auto_trigger = true,
debounce = 150,
keymap = { accept = false },
} },
specs = {
{ import = "astrocommunity.recipes.ai" },
{
"AstroNvim/astrocore",
opts = {
options = {
g = {
-- set the ai_accept function
ai_accept = function()
if require("copilot.suggestion").is_visible() then
require("copilot.suggestion").accept()
return true
end
end,
},
},
},
},
},
}
21 changes: 20 additions & 1 deletion lua/astrocommunity/completion/supermaven-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,31 @@ return {
event = "VeryLazy",
opts = {
keymaps = {
accept_suggestion = "<C-l>",
accept_suggestion = false,
clear_suggestion = "<C-h>",
accept_word = "<C-w>",
},
log_level = "warn",
disable_inline_completion = false, -- disables inline completion for use with cmp
disable_keymaps = false, -- disables built in keymaps for more manual control
},
specs = {
{ import = "astrocommunity.recipes.ai" },
{
"AstroNvim/astrocore",
opts = {
options = {
g = {
-- set the ai_accept function
ai_accept = function()
if require("supermaven-nvim.completion_preview").has_suggestion() then
vim.schedule(function() require("supermaven-nvim.completion_preview").on_accept_suggestion() end)
return true
end
end,
},
},
},
},
},
}
21 changes: 20 additions & 1 deletion lua/astrocommunity/completion/tabnine-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,24 @@ return {
build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh",
cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" },
event = "User AstroFile",
opts = { accept_keymap = "<C-e>" },
opts = { accept_keymap = false },
specs = {
{ import = "astrocommunity.recipes.ai" },
{
"AstroNvim/astrocore",
opts = {
options = {
g = {
-- set the ai_accept function
ai_accept = function()
if require("tabnine.keymaps").has_suggestion() then
require("tabnine.keymaps").accept_suggestion()
return true
end
end,
},
},
},
},
},
}