updating plugins
This commit is contained in:
@@ -1,76 +0,0 @@
|
||||
-- Get local config (loaded in core/init.lua)
|
||||
local local_cfg = vim.g.cargdev_local or {}
|
||||
|
||||
-- Skip plugin if local config is missing required values
|
||||
if not local_cfg.avante_dev_path then
|
||||
return {}
|
||||
end
|
||||
|
||||
return {
|
||||
{
|
||||
dir = local_cfg.avante_dev_path,
|
||||
event = "VeryLazy",
|
||||
lazy = false,
|
||||
version = false,
|
||||
build = "make BUILD_FROM_SOURCE=true",
|
||||
opts = {
|
||||
provider = "cargdev",
|
||||
mode = "agentic",
|
||||
debug = true,
|
||||
providers = {
|
||||
cargdev = {
|
||||
name = "cargdev",
|
||||
endpoint = local_cfg.avante_endpoint,
|
||||
api_key_name = local_cfg.avante_api_key_name,
|
||||
model = local_cfg.avante_model,
|
||||
__inherited_from = "ollama",
|
||||
max_tokens = 8192,
|
||||
disable_tools = false,
|
||||
use_ReAct_prompt = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"echasnovski/mini.pick",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"hrsh7th/nvim-cmp",
|
||||
"ibhagwan/fzf-lua",
|
||||
"stevearc/dressing.nvim",
|
||||
"folke/snacks.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
{
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
default = {
|
||||
embed_image_as_base64 = false,
|
||||
prompt_for_file_name = false,
|
||||
drag_and_drop = { insert_mode = true },
|
||||
use_absolute_path = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
ft = { "markdown", "Avante" },
|
||||
config = function()
|
||||
require("render-markdown").setup({
|
||||
file_types = { "markdown", "Avante" },
|
||||
latex = { enabled = false },
|
||||
html = { enabled = false },
|
||||
yaml = { enabled = false },
|
||||
})
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "markdown", "Avante" },
|
||||
callback = function()
|
||||
vim.treesitter.start()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -74,15 +74,15 @@ return {
|
||||
},
|
||||
tab_selected = {
|
||||
fg = "#c0caf5",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
},
|
||||
tab_separator = {
|
||||
fg = "#16161e",
|
||||
bg = "#16161e",
|
||||
},
|
||||
tab_separator_selected = {
|
||||
fg = "#1a1b26",
|
||||
bg = "#1a1b26",
|
||||
fg = "#1f2a48",
|
||||
bg = "#1f2a48",
|
||||
},
|
||||
buffer_visible = {
|
||||
fg = "#565f89",
|
||||
@@ -90,7 +90,7 @@ return {
|
||||
},
|
||||
buffer_selected = {
|
||||
fg = "#c0caf5",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -104,7 +104,7 @@ return {
|
||||
},
|
||||
numbers_selected = {
|
||||
fg = "#c0caf5",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -118,7 +118,7 @@ return {
|
||||
},
|
||||
diagnostic_selected = {
|
||||
fg = "#c0caf5",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -132,7 +132,7 @@ return {
|
||||
},
|
||||
hint_selected = {
|
||||
fg = "#1abc9c",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -146,7 +146,7 @@ return {
|
||||
},
|
||||
hint_diagnostic_selected = {
|
||||
fg = "#1abc9c",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -160,7 +160,7 @@ return {
|
||||
},
|
||||
info_selected = {
|
||||
fg = "#0db9d7",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -174,7 +174,7 @@ return {
|
||||
},
|
||||
info_diagnostic_selected = {
|
||||
fg = "#0db9d7",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -188,7 +188,7 @@ return {
|
||||
},
|
||||
warning_selected = {
|
||||
fg = "#e0af68",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -202,7 +202,7 @@ return {
|
||||
},
|
||||
warning_diagnostic_selected = {
|
||||
fg = "#e0af68",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -216,7 +216,7 @@ return {
|
||||
},
|
||||
error_selected = {
|
||||
fg = "#f7768e",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -230,7 +230,7 @@ return {
|
||||
},
|
||||
error_diagnostic_selected = {
|
||||
fg = "#f7768e",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
@@ -244,11 +244,11 @@ return {
|
||||
},
|
||||
modified_selected = {
|
||||
fg = "#e0af68",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
},
|
||||
duplicate_selected = {
|
||||
fg = "#c0caf5",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
italic = true,
|
||||
},
|
||||
duplicate_visible = {
|
||||
@@ -263,7 +263,7 @@ return {
|
||||
},
|
||||
separator_selected = {
|
||||
fg = "#16161e",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
},
|
||||
separator_visible = {
|
||||
fg = "#16161e",
|
||||
@@ -275,7 +275,7 @@ return {
|
||||
},
|
||||
indicator_selected = {
|
||||
fg = "#7aa2f7",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
},
|
||||
indicator_visible = {
|
||||
fg = "#16161e",
|
||||
@@ -283,7 +283,7 @@ return {
|
||||
},
|
||||
pick_selected = {
|
||||
fg = "#f7768e",
|
||||
bg = "#1a1b26",
|
||||
bg = "#1f2a48",
|
||||
bold = true,
|
||||
italic = false,
|
||||
},
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
return {
|
||||
-- Codetyper.nvim - AI-powered coding partner
|
||||
-- Local development version
|
||||
dir = "/Volumes/Carlos_SSD/Documents/projects/nvim.plugins/codetyper.nvim",
|
||||
name = "codetyper.nvim",
|
||||
lazy = false, -- Load on startup to create .coder folder
|
||||
priority = 100, -- Load early
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- Required: async utilities
|
||||
-- "nvim-treesitter/nvim-treesitter", -- Required: scope detection via Tree-sitter
|
||||
-- "nvim-treesitter/nvim-treesitter-textobjects", -- Optional: better text object support
|
||||
"MunifTanjim/nui.nvim", -- Optional: UI components
|
||||
},
|
||||
event = {
|
||||
"BufReadPre *.coder.*",
|
||||
"BufNewFile *.coder.*",
|
||||
},
|
||||
cmd = {
|
||||
"Coder",
|
||||
"CoderOpen",
|
||||
"CoderClose",
|
||||
"CoderToggle",
|
||||
"CoderProcess",
|
||||
"CoderTree",
|
||||
"CoderTreeView",
|
||||
"CoderAsk",
|
||||
"CoderAskToggle",
|
||||
"CoderAskClear",
|
||||
},
|
||||
keys = {
|
||||
-- Coder view commands
|
||||
{ "<leader>co", "<cmd>Coder open<cr>", desc = "Coder: Open view" },
|
||||
{ "<leader>cC", "<cmd>Coder close<cr>", desc = "Coder: Close view" },
|
||||
{ "<leader>ct", "<cmd>Coder toggle<cr>", desc = "Coder: Toggle view" },
|
||||
{ "<leader>cp", "<cmd>Coder process<cr>", desc = "Coder: Process prompt" },
|
||||
{ "<leader>cs", "<cmd>Coder status<cr>", desc = "Coder: Show status" },
|
||||
{ "<leader>cf", "<cmd>Coder focus<cr>", desc = "Coder: Switch focus" },
|
||||
{ "<leader>cv", "<cmd>Coder tree-view<cr>", desc = "Coder: View tree" },
|
||||
{ "<leader>cr", "<cmd>Coder tree<cr>", desc = "Coder: Refresh tree" },
|
||||
-- Ask panel commands
|
||||
{ "<leader>ca", "<cmd>Coder ask<cr>", desc = "Coder: Open Ask panel" },
|
||||
{ "<leader>cA", "<cmd>Coder ask-toggle<cr>", desc = "Coder: Toggle Ask panel" },
|
||||
{ "<leader>cx", "<cmd>Coder ask-clear<cr>", desc = "Coder: Clear Ask history" },
|
||||
-- Transform commands (inline /@ @/ replacement)
|
||||
{ "<leader>ctt", mode = "n", desc = "Coder: Transform tag at cursor" },
|
||||
{ "<leader>ctt", mode = "v", desc = "Coder: Transform selected tags" },
|
||||
{ "<leader>ctT", "<cmd>Coder transform<cr>", desc = "Coder: Transform all tags" },
|
||||
},
|
||||
config = function()
|
||||
require("codetyper").setup({
|
||||
llm = {
|
||||
-- Available providers: "ollama", "claude", "openai", "gemini", "copilot"
|
||||
provider = "copilot", -- Using GitHub Copilot
|
||||
|
||||
-- Ollama (local LLM)
|
||||
ollama = {
|
||||
host = "http://localhost:11434",
|
||||
model = "deepseek-coder:6.7b",
|
||||
-- model = "codellama:7b",
|
||||
-- model = "qwen2.5-coder:7b",
|
||||
},
|
||||
|
||||
-- Claude (Anthropic) - https://console.anthropic.com/
|
||||
-- claude = {
|
||||
-- api_key = vim.env.ANTHROPIC_API_KEY, -- or hardcode: "sk-ant-..."
|
||||
-- model = "claude-sonnet-4-20250514",
|
||||
-- -- model = "claude-3-5-sonnet-20241022",
|
||||
-- -- model = "claude-3-haiku-20240307",
|
||||
-- },
|
||||
|
||||
-- OpenAI - https://platform.openai.com/api-keys
|
||||
-- openai = {
|
||||
-- api_key = vim.env.OPENAI_API_KEY, -- or hardcode: "sk-..."
|
||||
-- model = "gpt-4o",
|
||||
-- -- model = "gpt-4o-mini",
|
||||
-- -- model = "gpt-4-turbo",
|
||||
-- },
|
||||
|
||||
-- Google Gemini - https://aistudio.google.com/apikey
|
||||
-- gemini = {
|
||||
-- api_key = vim.env.GEMINI_API_KEY, -- or hardcode: "AI..."
|
||||
-- model = "gemini-1.5-pro",
|
||||
-- -- model = "gemini-1.5-flash",
|
||||
-- -- model = "gemini-2.0-flash-exp",
|
||||
-- },
|
||||
|
||||
-- GitHub Copilot (uses OAuth from copilot.vim/copilot.lua)
|
||||
copilot = {
|
||||
model = "gpt-4o", -- or "gpt-4", "gpt-3.5-turbo"
|
||||
},
|
||||
},
|
||||
window = {
|
||||
width = 0.25, -- 1/4 of window
|
||||
position = "left",
|
||||
border = "rounded",
|
||||
},
|
||||
patterns = {
|
||||
open_tag = "/@",
|
||||
close_tag = "@/",
|
||||
file_pattern = "*.coder.*",
|
||||
},
|
||||
auto_gitignore = true,
|
||||
auto_open_ask = false, -- Always open Ask panel on startup
|
||||
agent_mode = false,
|
||||
scheduler = {
|
||||
enabled = true,
|
||||
ollama_scout = false, -- Disabled since using Copilot directly
|
||||
escalation_threshold = 0.7,
|
||||
max_concurrent = 2,
|
||||
completion_delay_ms = 100, -- Delay before checking completion visibility
|
||||
apply_delay_ms = 2000, -- Wait 2 seconds before applying code
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -18,11 +18,10 @@ return {
|
||||
auto_trigger = true,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
-- Let codetyper handle keymaps for unified experience
|
||||
accept = false,
|
||||
next = false,
|
||||
prev = false,
|
||||
dismiss = false,
|
||||
accept = "<C-l>",
|
||||
next = "<M-]>",
|
||||
prev = "<M-[>",
|
||||
dismiss = "<C-]>",
|
||||
},
|
||||
},
|
||||
filetypes = {
|
||||
|
||||
@@ -9,9 +9,14 @@ return {
|
||||
sqlfluff = {
|
||||
command = "sqlfluff",
|
||||
args = { "format", "--dialect", "postgres", "-" },
|
||||
stdin = true, -- Ensure it uses stdin
|
||||
stdin = true,
|
||||
cwd = require("conform.util").root_file({ ".git" }),
|
||||
},
|
||||
xmllint = {
|
||||
command = "xmllint",
|
||||
args = { "--format", "-" },
|
||||
stdin = true,
|
||||
},
|
||||
},
|
||||
formatters_by_ft = {
|
||||
javascript = { "prettier" },
|
||||
@@ -27,10 +32,12 @@ return {
|
||||
markdown = { "prettier" },
|
||||
graphql = { "prettier" },
|
||||
liquid = { "prettier" },
|
||||
xml = { "xmllint" },
|
||||
tex = { "latexindent" },
|
||||
lua = { "stylua" },
|
||||
python = { "isort", "black" },
|
||||
dbml = { "dbml" }, -- DBML formatting
|
||||
sql = { "sqlfluff" }, -- SQL formatting
|
||||
java = { "google-java-format" },
|
||||
},
|
||||
format_on_save = function(bufnr)
|
||||
-- Disable autoformat for certain filetypes
|
||||
|
||||
@@ -63,8 +63,14 @@ return {
|
||||
python = { "pylint" },
|
||||
dbml = { "dbml" },
|
||||
sql = { "sqlfluff" },
|
||||
html = { "htmlhint" },
|
||||
java = { "checkstyle" },
|
||||
tex = { "chktex" },
|
||||
}
|
||||
|
||||
-- Set full path for chktex (TeX binaries may not be in Neovim's PATH)
|
||||
lint.linters.chktex.cmd = "/Library/TeX/texbin/chktex"
|
||||
|
||||
local lint_augroup = api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
|
||||
@@ -74,6 +74,18 @@ return {
|
||||
return " " .. table.concat(names, ", ")
|
||||
end
|
||||
|
||||
-- Word counter (excluding symbols)
|
||||
local function word_count()
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||
local text = table.concat(lines, " ")
|
||||
local clean_text = text:gsub("[^%w%s]", "")
|
||||
local count = 0
|
||||
for _ in clean_text:gmatch("%w+") do
|
||||
count = count + 1
|
||||
end
|
||||
return "words: " .. count
|
||||
end
|
||||
|
||||
lualine.setup({
|
||||
options = {
|
||||
theme = theme,
|
||||
@@ -125,6 +137,7 @@ return {
|
||||
{ lsp_client, color = { fg = colors.cyan, bg = colors.bg_dark } },
|
||||
},
|
||||
lualine_y = {
|
||||
{ word_count, color = { fg = colors.cyan } },
|
||||
{ "encoding", icon = "" },
|
||||
{ "fileformat", icons_enabled = true },
|
||||
{ "filetype", colored = true, icon_only = false },
|
||||
|
||||
@@ -16,11 +16,7 @@ return {
|
||||
---Chat-plugin related options-----------------
|
||||
auto_approve = false, -- Auto approve mcp tool calls
|
||||
auto_toggle_mcp_servers = true, -- Let LLMs start and stop MCP servers automatically
|
||||
extensions = {
|
||||
avante = {
|
||||
make_slash_commands = true, -- make /slash commands from MCP server prompts
|
||||
},
|
||||
},
|
||||
extensions = {},
|
||||
|
||||
--- Plugin specific options-------------------
|
||||
native_servers = {}, -- add your custom lua native servers here
|
||||
|
||||
@@ -47,15 +47,8 @@ return {
|
||||
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
|
||||
["<C-e>"] = cmp.mapping.abort(), -- close completion window
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
-- Tab: codetyper suggestion > cmp selection > snippet jump > fallback
|
||||
-- Tab: cmp selection > snippet jump > fallback
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
-- Check for codetyper ghost text suggestion first
|
||||
local ok, suggestion = pcall(require, "codetyper.suggestion")
|
||||
if ok and suggestion.is_visible() then
|
||||
suggestion.accept()
|
||||
return
|
||||
end
|
||||
-- Then cmp menu
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
@@ -74,7 +67,6 @@ return {
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
-- sources for autocompletion
|
||||
-- Note: codetyper uses ghost text suggestions (Copilot-style), not cmp source
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp", priority = 1000 },
|
||||
{ name = "luasnip", priority = 750 }, -- snippets
|
||||
|
||||
18
lua/cargdev/plugins/vimtex.lua
Normal file
18
lua/cargdev/plugins/vimtex.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
"lervag/vimtex",
|
||||
ft = { "tex", "latex", "bib" },
|
||||
config = function()
|
||||
-- Use Skim on macOS (or change to your preferred PDF viewer)
|
||||
vim.g.vimtex_view_method = "skim"
|
||||
|
||||
-- Alternatively, use the general viewer (Preview.app)
|
||||
-- vim.g.vimtex_view_method = "general"
|
||||
-- vim.g.vimtex_view_general_viewer = "open"
|
||||
|
||||
-- Compiler settings
|
||||
vim.g.vimtex_compiler_method = "latexmk"
|
||||
|
||||
-- Disable quickfix auto-open (optional)
|
||||
vim.g.vimtex_quickfix_mode = 0
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user