fixing configs
This commit is contained in:
@@ -9,116 +9,47 @@ end
|
|||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
dir = local_cfg.avante_dev_path,
|
dir = local_cfg.avante_dev_path,
|
||||||
-- "yetone/avante.nvim",
|
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
version = false, -- Always pull the latest change
|
version = false,
|
||||||
build = "make", -- This will build on first load
|
build = "make BUILD_FROM_SOURCE=true",
|
||||||
opts = {
|
opts = {
|
||||||
provider = "cargdev", -- API provider configuration
|
provider = "cargdev",
|
||||||
mode = "agentic", -- Enable agentic mode for tool support
|
mode = "agentic",
|
||||||
debug = true, -- Enable debug logging to troubleshoot tools
|
debug = true,
|
||||||
providers = {
|
providers = {
|
||||||
cargdev = {
|
cargdev = {
|
||||||
name = "cargdev", -- Optional
|
name = "cargdev",
|
||||||
endpoint = local_cfg.avante_endpoint,
|
endpoint = local_cfg.avante_endpoint,
|
||||||
api_key_name = local_cfg.avante_api_key_name,
|
api_key_name = local_cfg.avante_api_key_name,
|
||||||
model = local_cfg.avante_model,
|
model = local_cfg.avante_model,
|
||||||
__inherited_from = "ollama", -- ensures compatibility
|
__inherited_from = "ollama",
|
||||||
max_tokens = 8192,
|
max_tokens = 8192,
|
||||||
-- Explicitly ensure tools are enabled
|
|
||||||
disable_tools = false,
|
disable_tools = false,
|
||||||
-- Tool format: false = function calling (JSON tools in request), true = XML tool format (tools in prompt)
|
use_ReAct_prompt = false,
|
||||||
use_ReAct_prompt = false, -- Use function calling format (OpenAI-compatible)
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- Build from source for development
|
|
||||||
-- Run `make BUILD_FROM_SOURCE=true` to build Rust components
|
|
||||||
-- You can also build manually: cd <avante_dev_path> && make
|
|
||||||
build = "make BUILD_FROM_SOURCE=true",
|
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"echasnovski/mini.pick", -- for file_selector provider mini.pick
|
"echasnovski/mini.pick",
|
||||||
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
"nvim-telescope/telescope.nvim",
|
||||||
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
|
"hrsh7th/nvim-cmp",
|
||||||
"ibhagwan/fzf-lua", -- for file_selector provider fzf
|
"ibhagwan/fzf-lua",
|
||||||
"stevearc/dressing.nvim", -- for input provider dressing
|
"stevearc/dressing.nvim",
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
{
|
{
|
||||||
"folke/snacks.nvim", -- for input provider snacks
|
"HakonHarnes/img-clip.nvim",
|
||||||
lazy = false,
|
|
||||||
priority = 1001, -- Higher than dressing to override it
|
|
||||||
dependencies = {
|
|
||||||
"stevearc/dressing.nvim", -- Load after dressing to override it
|
|
||||||
},
|
|
||||||
config = function()
|
|
||||||
local dashboard_config = require("cargdev.core.dashboard_config")
|
|
||||||
require("snacks").setup({
|
|
||||||
-- Enable all snacks modules
|
|
||||||
bigfile = { enabled = true },
|
|
||||||
dashboard = {
|
|
||||||
enabled = true,
|
|
||||||
width = 60,
|
|
||||||
row = nil,
|
|
||||||
col = nil,
|
|
||||||
pane_gap = 4,
|
|
||||||
autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
||||||
preset = {
|
|
||||||
keys = dashboard_config.get_snacks_keys(),
|
|
||||||
header = dashboard_config.get_header_string(),
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
{ section = "header" },
|
|
||||||
{ padding = 1 },
|
|
||||||
{ section = "keys", gap = 1, padding = 1 },
|
|
||||||
{ section = "startup" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
explorer = { enabled = true },
|
|
||||||
image = {
|
|
||||||
enabled = true,
|
|
||||||
terminal = nil, -- nil = auto-detect
|
|
||||||
},
|
|
||||||
input = { enabled = true },
|
|
||||||
lazygit = { enabled = true },
|
|
||||||
notifier = { enabled = true },
|
|
||||||
picker = { enabled = true },
|
|
||||||
quickfile = { enabled = true },
|
|
||||||
scope = { enabled = true },
|
|
||||||
scroll = { enabled = true },
|
|
||||||
statuscolumn = { enabled = true },
|
|
||||||
terminal = { enabled = true },
|
|
||||||
toggle = { enabled = true },
|
|
||||||
words = {
|
|
||||||
enabled = true,
|
|
||||||
lsp = { enabled = false },
|
|
||||||
hl = { enabled = true },
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Set up vim.ui.input and vim.ui.select for snacks
|
|
||||||
-- Use vim.schedule to ensure this runs after all plugins are loaded
|
|
||||||
vim.schedule(function()
|
|
||||||
vim.ui.input = require("snacks.input").input
|
|
||||||
vim.ui.select = require("snacks.picker").select
|
|
||||||
end)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
|
||||||
{
|
|
||||||
"HakonHarnes/img-clip.nvim", -- Image pasting support
|
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
opts = {
|
||||||
-- Recommended settings
|
|
||||||
default = {
|
default = {
|
||||||
embed_image_as_base64 = false,
|
embed_image_as_base64 = false,
|
||||||
prompt_for_file_name = false,
|
prompt_for_file_name = false,
|
||||||
drag_and_drop = {
|
drag_and_drop = { insert_mode = true },
|
||||||
insert_mode = true,
|
use_absolute_path = true,
|
||||||
},
|
|
||||||
use_absolute_path = true, -- For Windows users
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -128,11 +59,10 @@ return {
|
|||||||
config = function()
|
config = function()
|
||||||
require("render-markdown").setup({
|
require("render-markdown").setup({
|
||||||
file_types = { "markdown", "Avante" },
|
file_types = { "markdown", "Avante" },
|
||||||
latex = { enabled = false }, -- Disable latex to avoid warning
|
latex = { enabled = false },
|
||||||
html = { enabled = false }, -- Disable html support to avoid warnings
|
html = { enabled = false },
|
||||||
yaml = { enabled = false }, -- Disable yaml support to avoid warnings
|
yaml = { enabled = false },
|
||||||
})
|
})
|
||||||
-- Enable treesitter highlighter for markdown buffers
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
pattern = { "markdown", "Avante" },
|
pattern = { "markdown", "Avante" },
|
||||||
callback = function()
|
callback = function()
|
||||||
|
|||||||
@@ -1 +1,17 @@
|
|||||||
return { "j-hui/fidget.nvim", opts = {} }
|
return {
|
||||||
|
"j-hui/fidget.nvim",
|
||||||
|
opts = {
|
||||||
|
notification = {
|
||||||
|
window = {
|
||||||
|
winblend = 0,
|
||||||
|
border = "rounded",
|
||||||
|
align = "bottom",
|
||||||
|
},
|
||||||
|
view = {
|
||||||
|
stack_upwards = true,
|
||||||
|
},
|
||||||
|
filter = vim.log.levels.INFO,
|
||||||
|
override_vim_notify = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ return {
|
|||||||
orange = "#d19a66",
|
orange = "#d19a66",
|
||||||
red = "#e06c75",
|
red = "#e06c75",
|
||||||
yellow = "#e5c07b",
|
yellow = "#e5c07b",
|
||||||
fg = "#abb2bf",
|
fg = "#98c379", -- Bright green for better visibility
|
||||||
|
fg_dim = "#7ec8e3", -- Light blue for secondary text
|
||||||
bg = "#282c34",
|
bg = "#282c34",
|
||||||
bg_dark = "#21252b",
|
bg_dark = "#21252b",
|
||||||
white = "#ffffff",
|
white = "#ffffff",
|
||||||
@@ -25,38 +26,38 @@ return {
|
|||||||
local theme = {
|
local theme = {
|
||||||
normal = {
|
normal = {
|
||||||
a = { bg = colors.blue, fg = colors.black, gui = "bold" },
|
a = { bg = colors.blue, fg = colors.black, gui = "bold" },
|
||||||
b = { bg = colors.bg, fg = colors.blue },
|
b = { bg = colors.bg, fg = colors.cyan },
|
||||||
c = { bg = colors.bg_dark, fg = colors.fg },
|
c = { bg = colors.bg_dark, fg = colors.green },
|
||||||
z = { bg = colors.blue, fg = colors.black, gui = "bold" },
|
z = { bg = colors.blue, fg = colors.black, gui = "bold" },
|
||||||
},
|
},
|
||||||
insert = {
|
insert = {
|
||||||
a = { bg = colors.green, fg = colors.black, gui = "bold" },
|
a = { bg = colors.green, fg = colors.black, gui = "bold" },
|
||||||
b = { bg = colors.bg, fg = colors.green },
|
b = { bg = colors.bg, fg = colors.cyan },
|
||||||
c = { bg = colors.bg_dark, fg = colors.fg },
|
c = { bg = colors.bg_dark, fg = colors.green },
|
||||||
z = { bg = colors.green, fg = colors.black, gui = "bold" },
|
z = { bg = colors.green, fg = colors.black, gui = "bold" },
|
||||||
},
|
},
|
||||||
visual = {
|
visual = {
|
||||||
a = { bg = colors.magenta, fg = colors.black, gui = "bold" },
|
a = { bg = colors.magenta, fg = colors.black, gui = "bold" },
|
||||||
b = { bg = colors.bg, fg = colors.magenta },
|
b = { bg = colors.bg, fg = colors.cyan },
|
||||||
c = { bg = colors.bg_dark, fg = colors.fg },
|
c = { bg = colors.bg_dark, fg = colors.green },
|
||||||
z = { bg = colors.magenta, fg = colors.black, gui = "bold" },
|
z = { bg = colors.magenta, fg = colors.black, gui = "bold" },
|
||||||
},
|
},
|
||||||
command = {
|
command = {
|
||||||
a = { bg = colors.yellow, fg = colors.black, gui = "bold" },
|
a = { bg = colors.yellow, fg = colors.black, gui = "bold" },
|
||||||
b = { bg = colors.bg, fg = colors.yellow },
|
b = { bg = colors.bg, fg = colors.cyan },
|
||||||
c = { bg = colors.bg_dark, fg = colors.fg },
|
c = { bg = colors.bg_dark, fg = colors.green },
|
||||||
z = { bg = colors.yellow, fg = colors.black, gui = "bold" },
|
z = { bg = colors.yellow, fg = colors.black, gui = "bold" },
|
||||||
},
|
},
|
||||||
replace = {
|
replace = {
|
||||||
a = { bg = colors.red, fg = colors.black, gui = "bold" },
|
a = { bg = colors.red, fg = colors.black, gui = "bold" },
|
||||||
b = { bg = colors.bg, fg = colors.red },
|
b = { bg = colors.bg, fg = colors.cyan },
|
||||||
c = { bg = colors.bg_dark, fg = colors.fg },
|
c = { bg = colors.bg_dark, fg = colors.green },
|
||||||
z = { bg = colors.red, fg = colors.black, gui = "bold" },
|
z = { bg = colors.red, fg = colors.black, gui = "bold" },
|
||||||
},
|
},
|
||||||
inactive = {
|
inactive = {
|
||||||
a = { bg = colors.bg_dark, fg = colors.fg },
|
a = { bg = colors.bg_dark, fg = colors.cyan },
|
||||||
b = { bg = colors.bg_dark, fg = colors.fg },
|
b = { bg = colors.bg_dark, fg = colors.cyan },
|
||||||
c = { bg = colors.bg_dark, fg = colors.fg },
|
c = { bg = colors.bg_dark, fg = colors.cyan },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
55
lua/cargdev/plugins/snacks.lua
Normal file
55
lua/cargdev/plugins/snacks.lua
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
return {
|
||||||
|
"folke/snacks.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
local dashboard_config = require("cargdev.core.dashboard_config")
|
||||||
|
require("snacks").setup({
|
||||||
|
bigfile = { enabled = true },
|
||||||
|
dashboard = {
|
||||||
|
enabled = true,
|
||||||
|
width = 60,
|
||||||
|
row = nil,
|
||||||
|
col = nil,
|
||||||
|
pane_gap = 4,
|
||||||
|
autokeys = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
||||||
|
preset = {
|
||||||
|
keys = dashboard_config.get_snacks_keys(),
|
||||||
|
header = dashboard_config.get_header_string(),
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
{ section = "header" },
|
||||||
|
{ padding = 1 },
|
||||||
|
{ section = "keys", gap = 1, padding = 1 },
|
||||||
|
{ section = "startup" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
explorer = { enabled = true },
|
||||||
|
image = {
|
||||||
|
enabled = true,
|
||||||
|
terminal = nil,
|
||||||
|
},
|
||||||
|
input = { enabled = true },
|
||||||
|
lazygit = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
picker = { enabled = true },
|
||||||
|
quickfile = { enabled = true },
|
||||||
|
scope = { enabled = true },
|
||||||
|
scroll = { enabled = true },
|
||||||
|
statuscolumn = { enabled = true },
|
||||||
|
terminal = { enabled = true },
|
||||||
|
toggle = { enabled = true },
|
||||||
|
words = {
|
||||||
|
enabled = true,
|
||||||
|
lsp = { enabled = false },
|
||||||
|
hl = { enabled = true },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Set up vim.ui.input and vim.ui.select for snacks
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.ui.input = require("snacks.input").input
|
||||||
|
vim.ui.select = require("snacks.picker").select
|
||||||
|
end)
|
||||||
|
end,
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user