mirror of
https://github.com/cap153/nvim.git
synced 2025-12-26 19:25:01 +08:00
添加ai工具
This commit is contained in:
parent
ad1ae84e5f
commit
59f0ba6a45
6 changed files with 73 additions and 63 deletions
|
|
@ -1,16 +1,20 @@
|
|||
{
|
||||
"blink.cmp": { "branch": "main", "commit": "4f38ce99a472932d5776337f08f7a8180f1f571a" },
|
||||
"avante.nvim": { "branch": "main", "commit": "7dc5560909ebf5dc5a12eb9260045328032d6793" },
|
||||
"blink-cmp-avante": { "branch": "master", "commit": "ddefb8de3cb1286ab39e0ccec0f32a45d03391f2" },
|
||||
"blink.cmp": { "branch": "main", "commit": "022521a8910a5543b0251b21c9e1a1e989745796" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"catppuccin": { "branch": "main", "commit": "1bf070129c0b6f77cc23f6a2212dcdc868308c52" },
|
||||
"catppuccin": { "branch": "main", "commit": "8162a4bd9afb42837a655e404d1f937a87ba95e6" },
|
||||
"cellular-automaton.nvim": { "branch": "main", "commit": "1606e9d5d04ff254023c3f3c62842d065708d6d3" },
|
||||
"conform.nvim": { "branch": "master", "commit": "374aaf384e2e841607b8e2fe63fa3ad01d111c91" },
|
||||
"conform.nvim": { "branch": "master", "commit": "6feb2f28f9a9385e401857b21eeac3c1b66dd628" },
|
||||
"copilot.lua": { "branch": "master", "commit": "96e1bb1963f351700bf6737ef3695e8a0b90b12a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"dropbar.nvim": { "branch": "master", "commit": "0a79cbe16e3517bb7f58743b22db71fa175df142" },
|
||||
"dropbar.nvim": { "branch": "master", "commit": "1cb3facee196a4ac7ee31df502d5dddeb77122e7" },
|
||||
"fittencode.nvim": { "branch": "master", "commit": "be2e6e8345bb76922fae37012af10c3cc51585b5" },
|
||||
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "f33c5b2b94b7442c7b96a60e09319d71afb265bc" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "d5bb1dc3db78d7ab65dd8c5a6f32a38e383b9cb1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "43b0c856ae5f32a195d83f4a27fe21d63e6c966c" },
|
||||
"fzf-lua": { "branch": "main", "commit": "8adf950093af5361621cf52208d64995b1af78b5" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "8b729e489f1475615dc6c9737da917b3bc163605" },
|
||||
"gtranslate.nvim": { "branch": "master", "commit": "a3ce65cd2ccda9c3198869fee53553d575aa547d" },
|
||||
"img-clip.nvim": { "branch": "main", "commit": "08a02e14c8c0d42fa7a92c30a98fd04d6993b35d" },
|
||||
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
|
||||
|
|
@ -20,31 +24,33 @@
|
|||
"kommentary": { "branch": "main", "commit": "d5a111a3bc4109a8f913a5863c9092b3b3801482" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" },
|
||||
"llm.nvim": { "branch": "main", "commit": "0929c0a494b42b3df31c59dcd2f2663bda3730b4" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "15884cee63a8c205334ab13ab1c891cd4d27101a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "d39a75bbce4b8aad5d627191ea915179c77c100f" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7c7318e8bae7e3536ef6b9e86b9e38e74f2e125e" },
|
||||
"mini.nvim": { "branch": "stable", "commit": "0420076298c4457f200c2de468f65d080597a347" },
|
||||
"multicursor.nvim": { "branch": "1.0", "commit": "0e00ce4c272e3191b5e07cab36bd49aa32fca675" },
|
||||
"llm.nvim": { "branch": "main", "commit": "18013ee59b07230a755b28ab244dd46bcabd9ca1" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "0c6cca9f2c63dadeb9225c45bc92bb95a151d4af" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "ce0e87c0be12e7c48296a7513e90430e3eac7f24" },
|
||||
"mason.nvim": { "branch": "main", "commit": "9eaedb864cdadc29c6eb7d761a6c0d8aee26c91b" },
|
||||
"mini.nvim": { "branch": "stable", "commit": "94cae4660a8b2d95dbbd56e1fbc6fcfa2716d152" },
|
||||
"mini.pick": { "branch": "main", "commit": "fa1e449e1080bf7aa9b2890ee186d23b1b4e1287" },
|
||||
"multicursor.nvim": { "branch": "1.0", "commit": "cecbb3028ba166578eb8620ce885e2362d112ee0" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"nui.nvim": { "branch": "main", "commit": "f535005e6ad1016383f24e39559833759453564e" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "4d74e75913832866aa7de35e4202463ddf6efd1b" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "8df427aeba0a06c6577dc3ab82de3076964e3b8d" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "61e5109c8cf24807e4ae29813a3a82b31821dd45" },
|
||||
"nvim-dap": { "branch": "master", "commit": "f80de8ad944b1c464941cfcede597ab859060359" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "39dc331899521bbb4e102b614b71ab37464f8326" },
|
||||
"nvim-notify": { "branch": "master", "commit": "b5825cf9ee881dd8e43309c93374ed5b87b7a896" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "28d480e0624b259095e56f353ec911f9f2a0f404" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "5c48b8ba1b0b7b25feb6e34e7eb293ea893aedc4" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "066fd6505377e3fd4aa219e61ce94c2b8bdb0b79" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "4976d8b90401cba9b85f6861e4e5a6edef2f2086" },
|
||||
"nvim-ufo": { "branch": "main", "commit": "3c7a3570e9c9dc198a2ad4491b0b0e51c4d4ba08" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "f1420728f59843eb2ef084406b3d0201a0a0932d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1fb58cca9aebbc4fd32b086cb413548ce132c127" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
|
||||
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
|
||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "55ad4fb76ab68460f700599b7449385f0c4e858e" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "dac01bd6660af337613e8cfcb23a4aec5d3c0e38" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
|
||||
"suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },
|
||||
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
|
||||
"tabular": { "branch": "master", "commit": "12437cd1b53488e24936ec4b091c9324cafee311" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||
"yazi.nvim": { "branch": "main", "commit": "3fdffe5cc18f6946e0904e1d0257abefc31c0473" }
|
||||
"yazi.nvim": { "branch": "main", "commit": "43abf4ea13156aa0a2a49f1978ee0d9b4c94088f" }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,8 @@ vim.o.termguicolors = true
|
|||
vim.opt.updatetime = 200
|
||||
-- 指定keyword
|
||||
vim.opt.iskeyword = "_,49-57,A-Z,a-z"
|
||||
-- 让全局默认边框变成rounded或single
|
||||
vim.o.winborder = 'rounded'
|
||||
|
||||
-- 设置编码格式
|
||||
vim.o.fileencodings = 'utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1'
|
||||
|
|
|
|||
|
|
@ -93,5 +93,5 @@ require("lazy").setup({
|
|||
-- mcp server插件
|
||||
-- require("lazy.plugins.mcphub"),
|
||||
-- 像cursor一样使用neovim
|
||||
-- require("lazy.plugins.avante"),
|
||||
require("lazy.plugins.avante"),
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,47 +1,48 @@
|
|||
return {
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
version = false, -- Never set this value to "*"! Never!
|
||||
commit = "7dc5560",
|
||||
-- version = false, -- Never set this value to "*"! Never!
|
||||
opts = {
|
||||
-- behaviour = {
|
||||
-- enable_cursor_planning_mode = true, -- enable cursor planning mode!
|
||||
-- },
|
||||
provider = "openrouter",
|
||||
vendors = {
|
||||
openrouter = {
|
||||
__inherited_from = "openai",
|
||||
disable_tools = true,
|
||||
endpoint = "https://openrouter.ai/api/v1",
|
||||
api_key_name = "OPENROUTER_API_KEY",
|
||||
model = "deepseek/deepseek-chat-v3-0324:free",
|
||||
},
|
||||
},
|
||||
-- provider = "deepseek",
|
||||
-- provider = "openrouter",
|
||||
-- vendors = {
|
||||
-- deepseek = {
|
||||
-- openrouter = {
|
||||
-- __inherited_from = "openai",
|
||||
-- api_key_name = "DEEPSEEK_API_KEY",
|
||||
-- endpoint = "https://api.deepseek.com",
|
||||
-- model = "deepseek-chat",
|
||||
-- disable_tools = true,
|
||||
-- endpoint = "https://openrouter.ai/api/v1",
|
||||
-- api_key_name = "OPENROUTER_API_KEY",
|
||||
-- model = "deepseek/deepseek-chat-v3-0324:free",
|
||||
-- },
|
||||
-- },
|
||||
provider = "deepseek",
|
||||
vendors = {
|
||||
deepseek = {
|
||||
__inherited_from = "openai",
|
||||
api_key_name = "DEEPSEEK_API_KEY",
|
||||
endpoint = "https://api.deepseek.com",
|
||||
model = "deepseek-chat",
|
||||
},
|
||||
},
|
||||
-- The system_prompt type supports both a string and a function that returns a string. Using a function here allows dynamically updating the prompt with mcphub
|
||||
system_prompt = function()
|
||||
local hub = require("mcphub").get_hub_instance()
|
||||
return hub:get_active_servers_prompt()
|
||||
end,
|
||||
-- The custom_tools type supports both a list and a function that returns a list. Using a function here prevents requiring mcphub before it's loaded
|
||||
custom_tools = function()
|
||||
return {
|
||||
require("mcphub.extensions.avante").mcp_tool(),
|
||||
}
|
||||
end,
|
||||
-- system_prompt = function()
|
||||
-- local hub = require("mcphub").get_hub_instance()
|
||||
-- return hub:get_active_servers_prompt()
|
||||
-- end,
|
||||
-- -- The custom_tools type supports both a list and a function that returns a list. Using a function here prevents requiring mcphub before it's loaded
|
||||
-- custom_tools = function()
|
||||
-- return {
|
||||
-- require("mcphub.extensions.avante").mcp_tool(),
|
||||
-- }
|
||||
-- end,
|
||||
},
|
||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||
build = "make",
|
||||
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||
dependencies = {
|
||||
"ravitemer/mcphub.nvim",
|
||||
-- "ravitemer/mcphub.nvim",
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
|
@ -69,13 +70,13 @@ return {
|
|||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- -- Make sure to set this up properly if you have lazy=true
|
||||
-- "MeanderingProgrammer/render-markdown.nvim",
|
||||
-- opts = {
|
||||
-- file_types = { "markdown", "Avante" },
|
||||
-- },
|
||||
-- ft = { "markdown", "Avante" },
|
||||
-- },
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "Avante" },
|
||||
},
|
||||
ft = { "Avante" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ return {
|
|||
"saghen/blink.cmp",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
-- "Kaiser-Yang/blincmp-avante",
|
||||
"Kaiser-Yang/blink-cmp-avante",
|
||||
},
|
||||
version = "*",
|
||||
---@module 'blink.cmp'
|
||||
|
|
@ -75,7 +75,7 @@ return {
|
|||
"lsp",
|
||||
"path",
|
||||
"snippets",
|
||||
-- "avante",
|
||||
"avante",
|
||||
},
|
||||
providers = {
|
||||
-- score_offset设置优先级数字越大优先级越高
|
||||
|
|
@ -92,11 +92,13 @@ return {
|
|||
return 0
|
||||
end,
|
||||
},
|
||||
-- avante = {
|
||||
-- module = "blink-cmp-avante",
|
||||
-- name = "Avante",
|
||||
-- score_offset = 6,
|
||||
-- },
|
||||
avante = {
|
||||
module = "blink-cmp-avante",
|
||||
name = "Avante",
|
||||
opts = {
|
||||
-- options for blink-cmp-avante
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -17,8 +17,7 @@ return {
|
|||
-- "gopls",
|
||||
},
|
||||
automatic_enable = {
|
||||
exclude = {
|
||||
},
|
||||
exclude = {},
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue