nvim: reconfigure ai garbage
This commit is contained in:
parent
ae884e3232
commit
806d4a4c1a
4 changed files with 59 additions and 58 deletions
common/.config/nvim
|
@ -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" },
|
||||
|
|
58
common/.config/nvim/lua/plugins/ai.lua
Normal file
58
common/.config/nvim/lua/plugins/ai.lua
Normal 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",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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" },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
|
@ -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" },
|
||||
|
|
Loading…
Add table
Reference in a new issue