1
0
Fork 0

nvim: reconfigure ai garbage

This commit is contained in:
Luca Bilke 2025-01-19 17:35:18 +01:00
parent ae884e3232
commit 806d4a4c1a
Signed by: luca
GPG key ID: C9E851809C1A5BDE
4 changed files with 59 additions and 58 deletions
common/.config/nvim

View file

@ -15,7 +15,7 @@ vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
require("lazy").setup({
spec = {
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- { import = "lazyvim.plugins.extras.ai.copilot" },
{ import = "lazyvim.plugins.extras.ai.copilot" },
-- { import = "lazyvim.plugins.extras.ai.copilot-chat" },
{ import = "lazyvim.plugins.extras.coding.mini-surround" },
{ import = "lazyvim.plugins.extras.coding.mini-comment" },

View file

@ -0,0 +1,58 @@
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
dependencies = {
"stevearc/dressing.nvim",
{
"MeanderingProgrammer/render-markdown.nvim",
optional = true,
ft = function(_, ft)
vim.list_extend(ft, { "Avante" })
return ft
end,
opts = function(_, opts)
opts.file_types = vim.list_extend(opts.file_types or {}, { "Avante" })
end,
},
{
"folke/which-key.nvim",
optional = true,
opts = {
spec = {
{ "<leader>a", group = "ai" },
},
},
},
},
init = function()
local anthropic = require("lib").get_secret("anthropic")
local openai = require("lib").get_secret("openai")
vim.fn.setenv("ANTHROPIC_API_KEY", anthropic)
vim.fn.setenv("OPENAI_API_KEY", openai)
end,
opts = {
hints = { enabled = false },
provider = "claude",
},
build = "make",
},
{
"zbirenbaum/copilot.lua",
optional = true,
opts = {
filetypes = {
yaml = true,
[""] = false,
},
},
keys = {
{ "<leader>a", group = "ai" },
{
"<leader>aT",
"<CMD>Copilot toggle<CR>",
desc = "copilot: toggle",
},
},
},
}

View file

@ -1,39 +0,0 @@
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
dependencies = {
"stevearc/dressing.nvim",
},
init = function()
local anthropic = require("lib").get_secret("anthropic")
local openai = require("lib").get_secret("openai")
vim.fn.setenv("ANTHROPIC_API_KEY", anthropic)
vim.fn.setenv("OPENAI_API_KEY", openai)
end,
opts = {
hints = { enabled = false },
},
build = "make",
},
{
"MeanderingProgrammer/render-markdown.nvim",
optional = true,
ft = function(_, ft)
vim.list_extend(ft, { "Avante" })
return ft
end,
opts = function(_, opts)
opts.file_types = vim.list_extend(opts.file_types or {}, { "Avante" })
end,
},
{
"folke/which-key.nvim",
optional = true,
opts = {
spec = {
{ "<leader>a", group = "ai" },
},
},
},
}

View file

@ -12,24 +12,6 @@ return {
},
},
},
{
"zbirenbaum/copilot.lua",
optional = true,
opts = {
filetypes = {
yaml = true,
[""] = false,
},
},
keys = {
{ "<leader>a", "", desc = "+ai", mode = { "n" } },
{
"<leader>at",
"<CMD>Copilot toggle<CR>",
desc = "Toggle (Copilot)",
},
},
},
{
"NvChad/nvim-colorizer.lua",
cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" },