Compare commits

..

No commits in common. "311210a46dac9ef1137fa6eab1cfb4c252df02d0" and "95eb379e67ea91aa658f2b7b0d44147ae84dea95" have entirely different histories.

4 changed files with 123 additions and 189 deletions

View File

@ -2,7 +2,6 @@
"LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" }, "LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" },
"SchemaStore.nvim": { "branch": "main", "commit": "e659e0c6ca06727ed898aaaeea3850f528898684" }, "SchemaStore.nvim": { "branch": "main", "commit": "e659e0c6ca06727ed898aaaeea3850f528898684" },
"avante.nvim": { "branch": "main", "commit": "edf02a7d1fccb65f52d308594401d41134ff4d20" }, "avante.nvim": { "branch": "main", "commit": "edf02a7d1fccb65f52d308594401d41134ff4d20" },
"blink-cmp-avante": { "branch": "master", "commit": "e5a1be4c818520385f95fe2663c04e48f5f0c36a" },
"blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" }, "blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },

View File

@ -1,161 +0,0 @@
local function deepseek(model)
return {
__inherited_from = "openai",
api_key_name = "DEEPSEEK_API_KEY",
endpoint = "https://api.deepseek.com",
model = model,
}
end
local function qwen(model)
return {
__inherited_from = "openai",
api_key_name = "QWEN_API_KEY",
endpoint = "https://dashscope.aliyuncs.com/compatible-mode/v1/",
model = model,
disable_tools = true,
}
end
local function yostar(model)
return {
__inherited_from = "openai",
api_key_name = "YOSTAR_API_KEY",
endpoint = "https://litellm.yostar.net",
model = model,
disable_tools = true,
}
end
local function codestral()
return {
__inherited_from = "openai",
api_key_name = "CODESTRAL_API_KEY",
endpoint = "https://codestral.mistral.ai/v1",
model = "codestral-latest",
}
end
local function ark(model)
return {
__inherited_from = "openai",
api_key_name = "ARK_API_KEY",
endpoint = "https://ark.cn-beijing.volces.com/api/v3/",
model = model,
}
end
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = true,
dependencies = {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
opts = {
provider = "arkv3",
auto_suggestions_provider = "arkv3",
-- cursor_applying_provider = "yoqwen32",
-- behaviour = {
-- enable_cursor_planning_mode = true, -- enable cursor planning mode!
-- },
file_selector = {
provider = "fzf-lua",
provider_opts = {},
},
vendors = {
-- ds
dsv3 = deepseek("deepseek-chat"),
dsr1 = deepseek("deepseek-reasoner"),
-- 百炼
qwenv3 = qwen("deepseek-v3"),
qwenr1 = qwen("deepseek-r1"),
-- yostar
yor1 = yostar("DeepSeek-R1"),
yov3 = yostar("DeepSeek-V3"),
-- ark
arkv3 = ark("deepseek-v3-250324"),
-- codestral
codestral = codestral(),
},
},
},
{
"nvim-neo-tree/neo-tree.nvim",
config = function()
require("neo-tree").setup({
filesystem = {
commands = {
avante_add_files = function(state)
local node = state.tree:get_node()
local filepath = node:get_id()
local relative_path = require("avante.utils").relative_path(filepath)
local sidebar = require("avante").get()
local open = sidebar:is_open()
-- ensure avante sidebar is open
if not open then
require("avante.api").ask()
sidebar = require("avante").get()
end
sidebar.file_selector:add_selected_file(relative_path)
-- remove neo tree buffer
if not open then
sidebar.file_selector:remove_selected_file("neo-tree filesystem [1]")
end
end,
},
window = {
mappings = {
["oa"] = "avante_add_files",
},
},
},
})
end,
},
{
"saghen/blink.cmp",
dependencies = {
"Kaiser-Yang/blink-cmp-avante",
-- ... Other dependencies
},
opts = {
sources = {
-- Add 'avante' to the list
default = { "avante", "lsp", "path", "snippets", "buffer" },
providers = {
avante = {
module = "blink-cmp-avante",
name = "Avante",
opts = {
-- options for blink-cmp-avante
},
},
},
},
},
},
}

123
lua/plugins/editing.lua Normal file
View File

@ -0,0 +1,123 @@
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = true,
dependencies = {
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
opts = {
provider = "yochat",
auto_suggestions_provider = "codestral",
-- cursor_applying_provider = "yoqwen32",
-- behaviour = {
-- enable_cursor_planning_mode = true, -- enable cursor planning mode!
-- },
file_selector = {
provider = "fzf-lua",
provider_opts = {},
},
vendors = {
-- ds
dsv3 = {
__inherited_from = "openai",
api_key_name = "DEEPSEEK_API_KEY",
endpoint = "https://api.deepseek.com",
model = "deepseek-chat",
},
-- 百炼
qwenr1 = {
__inherited_from = "openai",
api_key_name = "QWEN_API_KEY",
endpoint = "https://dashscope.aliyuncs.com/compatible-mode/v1/",
model = "deepseek-r1",
disable_tools = true,
},
qwenchat = {
__inherited_from = "openai",
api_key_name = "QWEN_API_KEY",
endpoint = "https://dashscope.aliyuncs.com/compatible-mode/v1/",
model = "deepseek-v3",
disable_tools = true,
},
qwenqwq32 = {
__inherited_from = "openai",
api_key_name = "QWEN_API_KEY",
endpoint = "https://dashscope.aliyuncs.com/compatible-mode/v1/",
model = "qwq-32b",
disable_tools = true,
},
-- yostar
yor1 = {
__inherited_from = "openai",
api_key_name = "YOSTAR_API_KEY",
endpoint = "https://litellm.yostar.net",
model = "DeepSeek-R1",
disable_tools = true,
},
yochat = {
__inherited_from = "openai",
api_key_name = "YOSTAR_API_KEY",
endpoint = "https://litellm.yostar.net",
model = "DeepSeek-V3",
disable_tools = true,
},
yoqwq32 = {
__inherited_from = "openai",
api_key_name = "YOSTAR_API_KEY",
endpoint = "https://litellm.yostar.net",
model = "qwq-32b",
disable_tools = true,
},
codestral = {
__inherited_from = "openai",
api_key_name = "CODESTRAL_API_KEY",
endpoint = "https://codestral.mistral.ai/v1",
model = "codestral-latest",
},
},
},
},
{
"hat0uma/csvview.nvim",
ft = "csv",
config = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = "csv",
command = "CsvViewEnable",
})
require("csvview").setup({
parser = { comments = { "#", "//" } },
keymaps = {
-- Text objects for selecting fields
textobject_field_inner = { "if", mode = { "o", "x" } },
textobject_field_outer = { "af", mode = { "o", "x" } },
-- Excel-like navigation:
-- Use <Tab> and <S-Tab> to move horizontally between fields.
-- Use <Enter> and <S-Enter> to move vertically between rows and place the cursor at the end of the field.
-- Note: In terminals, you may need to enable CSI-u mode to use <S-Tab> and <S-Enter>.
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
jump_next_row = { "<Enter>", mode = { "n", "v" } },
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
},
})
end,
},
}

View File

@ -9,31 +9,4 @@ return {
}, },
}, },
}, },
{
"hat0uma/csvview.nvim",
ft = "csv",
config = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = "csv",
command = "CsvViewEnable",
})
require("csvview").setup({
parser = { comments = { "#", "//" } },
keymaps = {
-- Text objects for selecting fields
textobject_field_inner = { "if", mode = { "o", "x" } },
textobject_field_outer = { "af", mode = { "o", "x" } },
-- Excel-like navigation:
-- Use <Tab> and <S-Tab> to move horizontally between fields.
-- Use <Enter> and <S-Enter> to move vertically between rows and place the cursor at the end of the field.
-- Note: In terminals, you may need to enable CSI-u mode to use <S-Tab> and <S-Enter>.
jump_next_field_end = { "<Tab>", mode = { "n", "v" } },
jump_prev_field_end = { "<S-Tab>", mode = { "n", "v" } },
jump_next_row = { "<Enter>", mode = { "n", "v" } },
jump_prev_row = { "<S-Enter>", mode = { "n", "v" } },
},
})
end,
},
} }