🧠 User-selectable AI completion!

- Allows choosing the ai-completion tool you prefer
- Options are:
  - codeium (default)
  - copilot
  - tabnine
  - none
This commit is contained in:
2024-07-16 15:58:09 -04:00
parent e97d2f4c70
commit b19c10c746
2 changed files with 40 additions and 2 deletions
+39 -2
View File
@@ -3,8 +3,45 @@
-- -----------------------------------------------------------------------------
return {
{ import = "lazyvim.plugins.extras.coding.codeium" },
{ import = "lazyvim.plugins.extras.coding.tabnine" },
{
import = "lazyvim.plugins.extras.coding.codeium",
cond = function()
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.aitool") == 1 then
if
vim.fn.readfile(vim.fn.stdpath("config") .. "/.aitool")[1]
== "codeium"
then
return true
end
end
end,
},
{
import = "lazyvim.plugins.extras.coding.copilot",
cond = function()
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.aitool") == 1 then
if
vim.fn.readfile(vim.fn.stdpath("config") .. "/.aitool")[1]
== "copilot"
then
return true
end
end
end,
},
{
import = "lazyvim.plugins.extras.coding.tabnine",
cond = function()
if vim.fn.filereadable(vim.fn.stdpath("config") .. "/.aitool") == 1 then
if
vim.fn.readfile(vim.fn.stdpath("config") .. "/.aitool")[1]
== "tabnine"
then
return true
end
end
end,
},
{ import = "lazyvim.plugins.extras.coding.yanky" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
{ import = "lazyvim.plugins.extras.vscode" },