file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
crates/avante-html2md/src/lib.rs | Rust | use htmd::HtmlToMarkdown;
use mlua::prelude::*;
use std::error::Error;
#[derive(Debug)]
enum MyError {
HtmlToMd(String),
Request(String),
}
impl std::fmt::Display for MyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
MyError::HtmlToMd(e) => wri... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-c-defs.scm | Scheme | ;; Capture extern functions, variables, public classes, and methods
(function_definition
(storage_class_specifier) @extern
) @function
(struct_specifier) @struct
(struct_specifier
body: (field_declaration_list
(field_declaration
declarator: (field_identifier))? @class_variable
)
)
(declaration
(storag... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-c-sharp-defs.scm | Scheme | (class_declaration
name: (identifier) @class
(parameter_list)? @method) ;; Primary constructor
(record_declaration
name: (identifier) @class
(parameter_list)? @method) ;; Primary constructor
(interface_declaration
name: (identifier) @class)
(method_declaration) @method
(constructor_declaration) @method
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-cpp-defs.scm | Scheme | ;; Capture functions, variables, nammespaces, classes, methods, and enums
(namespace_definition) @namespace
(function_definition) @function
(class_specifier) @class
(class_specifier
body: (field_declaration_list
(declaration
declarator: (function_declarator))? @method
(field_declaration
declarator... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-elixir-defs.scm | Scheme | ; * modules and protocols
(call
target: (identifier) @ignore
(arguments (alias) @class)
(#match? @ignore "^(defmodule|defprotocol)$"))
; * functions
(call
target: (identifier) @ignore
(arguments
[
; zero-arity functions with no parentheses
(identifier) @method
; regular function clause
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-go-defs.scm | Scheme | ;; Capture top-level functions and struct definitions
(source_file
(var_declaration
(var_spec) @variable
)
)
(source_file
(const_declaration
(const_spec) @variable
)
)
(source_file
(function_declaration) @function
)
(source_file
(type_declaration
(type_spec (struct_type)) @class
)
)
(source_fi... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-java-defs.scm | Scheme | ;; Capture exported functions, arrow functions, variables, classes, and method definitions
(class_declaration
name: (identifier) @class)
(interface_declaration
name: (identifier) @class)
(enum_declaration
name: (identifier) @enum)
(enum_constant
name: (identifier) @enum_item)
(class_body
(field_declarati... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-javascript-defs.scm | Scheme | ;; Capture exported functions, arrow functions, variables, classes, and method definitions
(export_statement
declaration: (lexical_declaration
(variable_declarator) @variable
)
)
(export_statement
declaration: (function_declaration) @function
)
(export_statement
declaration: (class_declaration
body: (cl... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-lua-defs.scm | Scheme | ;; Capture function and method definitions
(variable_list) @variable
(function_declaration) @function
| yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-php-defs.scm | Scheme | ;; Capture exported functions, arrow functions, variables, classes, and method definitions
(class_declaration) @class
(interface_declaration) @class
(function_definition) @function
(assignment_expression) @assignment
(const_declaration
(const_element
(name) @variable))
(_
body: (declaration_list
(p... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-python-defs.scm | Scheme | ;; Capture top-level functions, class, and method definitions
(module
(expression_statement
(assignment) @assignment
)
)
(module
(function_definition) @function
)
(module
(class_definition
body: (block
(expression_statement
(assignment) @class_assignment
)
)
)
)
(module
(clas... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-ruby-defs.scm | Scheme | ;; Capture top-level methods, class definitions, and methods within classes
(class
(body_statement
(call)? @class_call
(assignment)? @class_assignment
(method)? @method
)
) @class
(program
(method) @function
)
(program
(assignment) @assignment
)
(module) @module
(module
(body_statement
(ca... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-rust-defs.scm | Scheme | ;; Capture public functions, structs, methods, and variable definitions
(function_item) @function
(impl_item
body: (declaration_list
(function_item) @method
)
)
(struct_item) @class
(struct_item
body: (field_declaration_list
(field_declaration) @class_variable
)
)
(enum_item
body: (enum_variant_list
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-scala-defs.scm | Scheme | (class_definition
name: (identifier) @class)
(object_definition
name: (identifier) @class)
(trait_definition
name: (identifier) @class)
(simple_enum_case
name: (identifier) @enum_item)
(full_enum_case
name: (identifier) @enum_item)
(template_body
(function_definition) @method
)
(template_body
(funct... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-swift-defs.scm | Scheme | (property_declaration) @variable
(function_declaration) @function
(class_declaration
_?
[
"struct"
"class"
]) @class
(class_declaration
_?
"enum"
) @enum
(class_body
(property_declaration) @class_variable)
(class_body
(function_declaration) @method)
(class_body
(init_declaration) @method)
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-typescript-defs.scm | Scheme | ;; Capture exported functions, arrow functions, variables, classes, and method definitions
(export_statement
declaration: (lexical_declaration
(variable_declarator) @variable
)
)
(export_statement
declaration: (function_declaration) @function
)
(export_statement
declaration: (class_declaration
body: (cl... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/queries/tree-sitter-zig-defs.scm | Scheme | ;; Capture functions, structs, methods, variable definitions, and unions in Zig
(variable_declaration (identifier)
(struct_declaration
(container_field) @class_variable))
(variable_declaration (identifier)
(struct_declaration
(function_declaration
name: (identifier) @method)))
(variab... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-repo-map/src/lib.rs | Rust | #![allow(clippy::unnecessary_map_or)]
use mlua::prelude::*;
use std::cell::RefCell;
use std::collections::BTreeMap;
use tree_sitter::{Node, Parser, Query, QueryCursor};
use tree_sitter_language::LanguageFn;
#[derive(Debug, Clone)]
pub struct Func {
pub name: String,
pub params: String,
pub return_type: St... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-templates/src/lib.rs | Rust | use minijinja::{context, Environment};
use mlua::prelude::*;
use serde::{Deserialize, Serialize};
use std::path::Path;
use std::sync::{Arc, Mutex};
struct State<'a> {
environment: Mutex<Option<Environment<'a>>>,
}
impl State<'_> {
fn new() -> Self {
State {
environment: Mutex::new(None),
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
crates/avante-tokenizers/src/lib.rs | Rust | use hf_hub::{api::sync::ApiBuilder, Repo, RepoType};
use mlua::prelude::*;
use regex::Regex;
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use tiktoken_rs::{get_bpe_from_model, CoreBPE};
use tokenizers::Tokenizer;
struct Tiktoken {
bpe: CoreBPE,
}
impl Tiktoken {
fn new(model: &str) -> Self {
l... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/api.lua | Lua | local Config = require("avante.config")
local Utils = require("avante.utils")
local PromptInput = require("avante.ui.prompt_input")
---@class avante.ApiToggle
---@operator call(): boolean
---@field debug ToggleBind.wrap
---@field hint ToggleBind.wrap
---@class avante.Api
---@field toggle avante.ApiToggle
local M = {}... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/auth/pkce.lua | Lua | local M = {}
---Generates a random N number of bytes using crypto lib over ffi, falling back to urandom
---@param n integer number of bytes to generate
---@return string|nil bytes string of bytes generated, or nil if all methods fail
---@return string|nil error error message if generation failed
local function get_ran... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/clipboard.lua | Lua | ---NOTE: this module is inspired by https://github.com/HakonHarnes/img-clip.nvim/tree/main
---@see https://github.com/ekickx/clipboard-image.nvim/blob/main/lua/clipboard-image/paste.lua
local Path = require("plenary.path")
local Utils = require("avante.utils")
local Config = require("avante.config")
---@module "img-cl... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/config.lua | Lua | ---NOTE: user will be merged with defaults and
---we add a default var_accessor for this table to config values.
---@alias WebSearchEngineProviderResponseBodyFormatter fun(body: table): (string, string?)
---@alias avante.InputProvider "native" | "dressing" | "snacks" | fun(input: avante.ui.Input): nil
local Utils = r... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/diff.lua | Lua | local api = vim.api
local Config = require("avante.config")
local Utils = require("avante.utils")
local Highlights = require("avante.highlights")
local H = {}
local M = {}
-----------------------------------------------------------------------------//
-- REFERENCES:
--------------------------------------------------... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/extensions/init.lua | Lua | ---@class avante.extensions
local M = {}
setmetatable(M, {
__index = function(t, k)
---@diagnostic disable-next-line: no-unknown
t[k] = require("avante.extensions." .. k)
return t[k]
end,
})
| yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/extensions/nvim_tree.lua | Lua | local Api = require("avante.api")
--- @class avante.extensions.nvim_tree
local M = {}
--- Adds the currently selected file in NvimTree to the selection via Api.add_selected_file.
-- Notifies the user if not invoked within NvimTree or if errors occur.
--- @return nil
function M.add_file()
if vim.bo.filetype ~= "Nvim... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/file_selector.lua | Lua | local Utils = require("avante.utils")
local Config = require("avante.config")
local Selector = require("avante.ui.selector")
local PROMPT_TITLE = "(Avante) Add a file"
--- @class FileSelector
local FileSelector = {}
--- @class FileSelector
--- @field id integer
--- @field selected_filepaths string[] Absolute paths
-... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/health.lua | Lua | local M = {}
local H = require("vim.health")
local Utils = require("avante.utils")
local Config = require("avante.config")
function M.check()
H.start("avante.nvim")
-- Required dependencies with their module names
local required_plugins = {
["plenary.nvim"] = {
path = "nvim-lua/plenary.nvim",
mo... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/highlights.lua | Lua | local api = vim.api
local Config = require("avante.config")
local Utils = require("avante.utils")
local bit = require("bit")
local rshift, band = bit.rshift, bit.band
local Highlights = {
TITLE = { name = "AvanteTitle", fg = "#1e222a", bg = "#98c379" },
REVERSED_TITLE = { name = "AvanteReversedTitle", fg = "#98c3... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/history/helpers.lua | Lua | local Utils = require("avante.utils")
local M = {}
---If message is a text message return the text.
---@param message avante.HistoryMessage
---@return string | nil
function M.get_text_data(message)
local content = message.message.content
if type(content) == "table" then
assert(#content == 1, "more than one en... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/history/init.lua | Lua | local Helpers = require("avante.history.helpers")
local Message = require("avante.history.message")
local Utils = require("avante.utils")
local M = {}
M.Helpers = Helpers
M.Message = Message
---@param history avante.ChatHistory
---@return avante.HistoryMessage[]
function M.get_history_messages(history)
if history.... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/history/message.lua | Lua | local Utils = require("avante.utils")
---@class avante.HistoryMessage
local M = {}
M.__index = M
---@class avante.HistoryMessage.Opts
---@field uuid? string
---@field turn_id? string
---@field state? avante.HistoryMessageState
---@field displayed_content? string
---@field original_content? AvanteLLMMessageContent
---... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/history/render.lua | Lua | local Helpers = require("avante.history.helpers")
local Line = require("avante.ui.line")
local Utils = require("avante.utils")
local Highlights = require("avante.highlights")
local M = {}
---@diagnostic disable-next-line: deprecated
local islist = vim.islist or vim.tbl_islist
---Converts text into format suitable fo... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/history_selector.lua | Lua | local History = require("avante.history")
local Utils = require("avante.utils")
local Path = require("avante.path")
local Config = require("avante.config")
local Selector = require("avante.ui.selector")
---@class avante.HistorySelector
local M = {}
---@param history avante.ChatHistory
---@return table?
local function... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/html2md.lua | Lua | ---@class AvanteHtml2Md
---@field fetch_md fun(url: string): string
local _html2md_lib = nil
local M = {}
---@return AvanteHtml2Md|nil
function M._init_html2md_lib()
if _html2md_lib ~= nil then return _html2md_lib end
local ok, core = pcall(require, "avante_html2md")
if not ok then return nil end
_html2md_l... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/init.lua | Lua | local api = vim.api
local Utils = require("avante.utils")
local Sidebar = require("avante.sidebar")
local Selection = require("avante.selection")
local Suggestion = require("avante.suggestion")
local Config = require("avante.config")
local Diff = require("avante.diff")
local RagService = require("avante.rag_service")
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/libs/ReAct_parser.lua | Lua | local M = {}
-- Helper function to parse a parameter tag like <param_name>value</param_name>
-- Returns {name = string, value = string, next_pos = number} or nil if incomplete
local function parse_parameter(text, start_pos)
local i = start_pos
local len = #text
-- Skip whitespace
while i <= len and string.mat... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/libs/ReAct_parser2.lua | Lua | local JsonParser = require("avante.libs.jsonparser")
---@class avante.TextContent
---@field type "text"
---@field text string
---@field partial boolean
---
---@class avante.ToolUseContent
---@field type "tool_use"
---@field tool_name string
---@field tool_input table
---@field partial boolean
local M = {}
--- Parse ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/libs/acp_client.lua | Lua | local Config = require("avante.config")
local Utils = require("avante.utils")
---@class avante.acp.ClientCapabilities
---@field fs avante.acp.FileSystemCapability
---@class avante.acp.FileSystemCapability
---@field readTextFile boolean
---@field writeTextFile boolean
---@class avante.acp.AgentCapabilities
---@field ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/libs/jsonparser.lua | Lua | -- JSON Streaming Parser for Lua
local JsonParser = {}
-- 流式解析器状态
local StreamParser = {}
StreamParser.__index = StreamParser
-- JSON 解析状态枚举
local PARSE_STATE = {
READY = "ready",
PARSING = "parsing",
INCOMPLETE = "incomplete",
ERROR = "error",
OBJECT_START = "object_start",
OBJECT_KEY = "object_key",
O... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/libs/xmlparser.lua | Lua | -- XML Parser for Lua
local XmlParser = {}
-- 流式解析器状态
local StreamParser = {}
StreamParser.__index = StreamParser
-- 创建新的流式解析器实例
function StreamParser.new()
local parser = {
buffer = "", -- 缓冲区存储未处理的内容
stack = {}, -- 标签栈
results = {}, -- 已完成的元素列表
current = nil, -- 当前正在处理的元素
root = nil, -- 当前根元素
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm.lua | Lua | local api = vim.api
local fn = vim.fn
local uv = vim.uv
local curl = require("plenary.curl")
local ACPClient = require("avante.libs.acp_client")
local Utils = require("avante.utils")
local Prompts = require("avante.utils.prompts")
local Config = require("avante.config")
local Path = require("avante.path")
local PPath... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/attempt_completion.lua | Lua | local Base = require("avante.llm_tools.base")
local Config = require("avante.config")
local Highlights = require("avante.highlights")
local Line = require("avante.ui.line")
---@alias AttemptCompletionInput {result: string, command?: string}
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "attempt_c... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/base.lua | Lua | local M = {}
function M:__call(opts, on_log, on_complete) return self.func(opts, on_log, on_complete) end
return M
| yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/bash.lua | Lua | local Path = require("plenary.path")
local Utils = require("avante.utils")
local Helpers = require("avante.llm_tools.helpers")
local Base = require("avante.llm_tools.base")
local Config = require("avante.config")
local Providers = require("avante.providers")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/create.lua | Lua | local Path = require("plenary.path")
local Utils = require("avante.utils")
local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "create"
M.description = "The create tool allows you to create a new file with... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/delete_tool_use_messages.lua | Lua | local Base = require("avante.llm_tools.base")
local History = require("avante.history")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "delete_tool_use_messages"
M.description =
"Since many tool use messages are useless for completing subsequent tasks and may cause excessive token consumption or... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/dispatch_agent.lua | Lua | local Providers = require("avante.providers")
local Config = require("avante.config")
local Utils = require("avante.utils")
local Base = require("avante.llm_tools.base")
local History = require("avante.history")
local Line = require("avante.ui.line")
local Highlights = require("avante.highlights")
---@class AvanteLLMT... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/edit_file.lua | Lua | local Base = require("avante.llm_tools.base")
local Providers = require("avante.providers")
local Utils = require("avante.utils")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "edit_file"
M.enabled = function()
return require("avante.config").mode == "agentic" and require("avante.config").behav... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/get_diagnostics.lua | Lua | local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
local Utils = require("avante.utils")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "get_diagnostics"
M.description = "Get diagnostics from a specific file"
---@type AvanteLLMToolParam
M.param = {
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/glob.lua | Lua | local Helpers = require("avante.llm_tools.helpers")
local Base = require("avante.llm_tools.base")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "glob"
M.description = 'Fast file pattern matching using glob patterns like "**/*.js", in current project scope'
---@type AvanteLLMToolParam
M.param = {... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/grep.lua | Lua | local Path = require("plenary.path")
local Utils = require("avante.utils")
local Helpers = require("avante.llm_tools.helpers")
local Base = require("avante.llm_tools.base")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "grep"
M.description = "Search for a keyword in a directory using grep in curr... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/helpers.lua | Lua | local Utils = require("avante.utils")
local Path = require("plenary.path")
local Config = require("avante.config")
local ACPConfirmAdapter = require("avante.ui.acp_confirm_adapter")
local M = {}
M.CANCEL_TOKEN = "__CANCELLED__"
-- Track cancellation state
M.is_cancelled = false
---@type avante.ui.Confirm
M.confirm_p... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/init.lua | Lua | local curl = require("plenary.curl")
local Utils = require("avante.utils")
local Path = require("plenary.path")
local Config = require("avante.config")
local RagService = require("avante.rag_service")
local Helpers = require("avante.llm_tools.helpers")
local M = {}
---@type AvanteLLMToolFunc<{ path: string }>
functio... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/insert.lua | Lua | local Path = require("plenary.path")
local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
local Highlights = require("avante.highlights")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "insert"
M.description = "The insert tool allows you to insert text ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/ls.lua | Lua | local Utils = require("avante.utils")
local Helpers = require("avante.llm_tools.helpers")
local Base = require("avante.llm_tools.base")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "ls"
M.description = "List files and directories in a given path in current project scope"
---@type AvanteLLMToolP... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/read_todos.lua | Lua | local Base = require("avante.llm_tools.base")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "read_todos"
M.description = "Read TODOs from the current task"
---@type AvanteLLMToolParam
M.param = {
type = "table",
fields = {},
usage = {},
}
---@type AvanteLLMToolReturn[]
M.returns = {
{
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/replace_in_file.lua | Lua | local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
local Utils = require("avante.utils")
local Highlights = require("avante.highlights")
local Config = require("avante.config")
local PRIORITY = (vim.hl or vim.highlight).priorities.user
local NAMESPACE = vim.api.nvim_creat... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/str_replace.lua | Lua | local Base = require("avante.llm_tools.base")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "str_replace"
M.description =
"The str_replace tool allows you to replace a specific string in a file with a new string. This is used for making precise edits."
function M.enabled()
return require("av... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/think.lua | Lua | local Line = require("avante.ui.line")
local Base = require("avante.llm_tools.base")
local Highlights = require("avante.highlights")
local Utils = require("avante.utils")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "think"
function M.enabled()
local Providers = require("avante.providers")
l... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/undo_edit.lua | Lua | local Path = require("plenary.path")
local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
local Utils = require("avante.utils")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "undo_edit"
M.description = "The undo_edit tool allows you to revert the last ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/view.lua | Lua | local Path = require("plenary.path")
local Utils = require("avante.utils")
local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "view"
M.description = [[Reads the content of the given file in the project.
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/write_to_file.lua | Lua | local Utils = require("avante.utils")
local Base = require("avante.llm_tools.base")
local Helpers = require("avante.llm_tools.helpers")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "write_to_file"
M.description =
"Request to write content to a file at the specified path. If the file exists, it... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/llm_tools/write_todos.lua | Lua | local Base = require("avante.llm_tools.base")
---@class AvanteLLMTool
local M = setmetatable({}, Base)
M.name = "write_todos"
M.description = "Write TODOs to the current task"
---@type AvanteLLMToolParam
M.param = {
type = "table",
fields = {
{
name = "todos",
description = "The entire TODOs arr... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/model_selector.lua | Lua | local Utils = require("avante.utils")
local Providers = require("avante.providers")
local Config = require("avante.config")
local Selector = require("avante.ui.selector")
---@class avante.ModelSelector
local M = {}
M.list_models_invoked = {}
M.list_models_returned = {}
local list_models_cached_result = {}
---@param... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/path.lua | Lua | local fn = vim.fn
local Utils = require("avante.utils")
local Path = require("plenary.path")
local Scan = require("plenary.scandir")
local Config = require("avante.config")
---@class avante.Path
---@field history_path Path
---@field cache_path Path
---@field data_path Path
local P = {}
---@param bufnr integer | nil
-... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/azure.lua | Lua | ---@class AvanteAzureExtraRequestBody
---@field temperature number
---@field max_completion_tokens number
---@field reasoning_effort? string
---@class AvanteAzureProvider: AvanteDefaultBaseProvider
---@field deployment string
---@field api_version string
---@field extra_request_body AvanteAzureExtraRequestBody
local ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/bedrock.lua | Lua | local Utils = require("avante.utils")
local P = require("avante.providers")
---@class AvanteBedrockProviderFunctor
local M = {}
M.api_key_name = "BEDROCK_KEYS"
---@class AWSCreds
---@field access_key_id string
---@field secret_access_key string
---@field session_token string
local AWSCreds = {}
M = setmetatable(M, ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/bedrock/claude.lua | Lua | ---@class AvanteBedrockClaudeTextMessage
---@field type "text"
---@field text string
---
---@class AvanteBedrockClaudeMessage
---@field role "user" | "assistant"
---@field content [AvanteBedrockClaudeTextMessage][]
local P = require("avante.providers")
local Claude = require("avante.providers.claude")
---@class Avant... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/claude.lua | Lua | local Utils = require("avante.utils")
local Clipboard = require("avante.clipboard")
local P = require("avante.providers")
local HistoryMessage = require("avante.history.message")
local JsonParser = require("avante.libs.jsonparser")
local Config = require("avante.config")
local Path = require("plenary.path")
local pkce ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/cohere.lua | Lua | local Utils = require("avante.utils")
local P = require("avante.providers")
---@alias CohereFinishReason "COMPLETE" | "LENGTH" | "ERROR"
---@alias CohereStreamType "message-start" | "content-start" | "content-delta" | "content-end" | "message-end"
---
---@class CohereChatContent
---@field type? CohereStreamType
---@fi... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/copilot.lua | Lua | ---Reference implementation:
---https://github.com/zbirenbaum/copilot.lua/blob/master/lua/copilot/auth.lua config file
---https://github.com/zed-industries/zed/blob/ad43bbbf5eda59eba65309735472e0be58b4f7dd/crates/copilot/src/copilot_chat.rs#L272 for authorization
---
---@class CopilotToken
---@field annotations_enabled... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/gemini.lua | Lua | local Utils = require("avante.utils")
local Providers = require("avante.providers")
local Clipboard = require("avante.clipboard")
local OpenAI = require("avante.providers").openai
local Prompts = require("avante.utils.prompts")
---@class AvanteProviderFunctor
local M = {}
M.api_key_name = "GEMINI_API_KEY"
M.role_map ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/init.lua | Lua | local api, fn = vim.api, vim.fn
local Config = require("avante.config")
local Utils = require("avante.utils")
---@class avante.Providers
---@field azure AvanteProviderFunctor
---@field bedrock AvanteBedrockProviderFunctor
---@field claude AvanteProviderFunctor
---@field cohere AvanteProviderFunctor
---@field copilot ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/ollama.lua | Lua | local Utils = require("avante.utils")
local Providers = require("avante.providers")
local Config = require("avante.config")
local Clipboard = require("avante.clipboard")
local HistoryMessage = require("avante.history.message")
local Prompts = require("avante.utils.prompts")
---@class AvanteProviderFunctor
local M = {}... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/openai.lua | Lua | local Utils = require("avante.utils")
local Config = require("avante.config")
local Clipboard = require("avante.clipboard")
local Providers = require("avante.providers")
local HistoryMessage = require("avante.history.message")
local ReActParser = require("avante.libs.ReAct_parser2")
local JsonParser = require("avante.l... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/vertex.lua | Lua | local P = require("avante.providers")
local Utils = require("avante.utils")
local Gemini = require("avante.providers.gemini")
---@class AvanteProviderFunctor
local M = {}
M.api_key_name = "cmd:gcloud auth application-default print-access-token"
M.role_map = {
user = "user",
assistant = "model",
}
M.is_disable_s... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/vertex_claude.lua | Lua | local P = require("avante.providers")
local Utils = require("avante.utils")
local Vertex = require("avante.providers.vertex")
---@class AvanteProviderFunctor
local M = {}
M.role_map = {
user = "user",
assistant = "assistant",
}
M.is_disable_stream = P.claude.is_disable_stream
M.parse_messages = P.claude.parse_me... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/providers/watsonx_code_assistant.lua | Lua | -- Documentation for setting up IBM Watsonx Code Assistant
--- Generating an access token: https://www.ibm.com/products/watsonx-code-assistant or https://github.ibm.com/code-assistant/wca-api
local P = require("avante.providers")
local Utils = require("avante.utils")
local curl = require("plenary.curl")
local Config = ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/rag_service.lua | Lua | local curl = require("plenary.curl")
local Path = require("plenary.path")
local Config = require("avante.config")
local Utils = require("avante.utils")
local M = {}
local container_name = "avante-rag-service"
local service_path = "/tmp/" .. container_name
function M.get_rag_service_image()
if Config.rag_service an... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/range.lua | Lua | ---@class avante.Range
---@field start avante.RangeSelection start point
---@field finish avante.RangeSelection Selection end point
local Range = {}
Range.__index = Range
---@class avante.RangeSelection: table<string, integer>
---@field lnum number
---@field col number
---Create a selection range
---@param start avan... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/repo_map.lua | Lua | local Popup = require("nui.popup")
local Utils = require("avante.utils")
local event = require("nui.utils.autocmd").event
local filetype_map = {
["javascriptreact"] = "javascript",
["typescriptreact"] = "typescript",
["cs"] = "csharp",
}
---@class AvanteRepoMap
---@field stringify_definitions fun(lang: string, ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/selection.lua | Lua | local Utils = require("avante.utils")
local Config = require("avante.config")
local Llm = require("avante.llm")
local Provider = require("avante.providers")
local RepoMap = require("avante.repo_map")
local PromptInput = require("avante.ui.prompt_input")
local SelectionResult = require("avante.selection_result")
local R... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/selection_result.lua | Lua | ---@class avante.SelectionResult
---@field filepath string Filepath of the selected content
---@field filetype string Filetype of the selected content
---@field content string Selected content
---@field range avante.Range Selection range
local SelectionResult = {}
SelectionResult.__index = SelectionResult
-- Create a ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/sidebar.lua | Lua | local api = vim.api
local fn = vim.fn
local Split = require("nui.split")
local event = require("nui.utils.autocmd").event
local PPath = require("plenary.path")
local Providers = require("avante.providers")
local Path = require("avante.path")
local Config = require("avante.config")
local Diff = require("avante.diff")
... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/suggestion.lua | Lua | local Utils = require("avante.utils")
local Llm = require("avante.llm")
local Highlights = require("avante.highlights")
local Config = require("avante.config")
local Providers = require("avante.providers")
local HistoryMessage = require("avante.history.message")
local api = vim.api
local fn = vim.fn
local SUGGESTION_N... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/tokenizers.lua | Lua | local Utils = require("avante.utils")
---@class AvanteTokenizer
---@field from_pretrained fun(model: string): nil
---@field encode fun(string): integer[]
local tokenizers = nil
---@type "gpt-4o" | string
local current_model = "gpt-4o"
local M = {}
---@param model "gpt-4o" | string
---@return AvanteTokenizer|nil
fun... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/types.lua | Lua | ---@meta
---@class vim.api.create_autocmd.callback.args
---@field id number
---@field event string
---@field group number?
---@field match string
---@field buf number
---@field file string
---@field data any
---@class vim.api.keyset.create_autocmd.opts: vim.api.keyset.create_autocmd
---@field callback? fun(ev:vim.api... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/acp_confirm_adapter.lua | Lua | local Highlights = require("avante.highlights")
---@class avante.ui.ConfirmAdapter
local M = {}
---@class avante.ui.ACPConfirmAdapter.ACPMappedOptions
---@field yes? string
---@field all? string
---@field no? string
---Converts the ACP permission options to confirmation popup-compatible format (yes/all/no)
---@param... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/button_group_line.lua | Lua | local Highlights = require("avante.highlights")
local Line = require("avante.ui.line")
local Utils = require("avante.utils")
---@class avante.ui.ButtonGroupLine
---@field _line avante.ui.Line
---@field _button_options { id: string, icon?: string, name: string, hl?: string }[]
---@field _focus_index integer
---@field _... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/confirm.lua | Lua | local Popup = require("nui.popup")
local NuiText = require("nui.text")
local Highlights = require("avante.highlights")
local Utils = require("avante.utils")
local Line = require("avante.ui.line")
local PromptInput = require("avante.ui.prompt_input")
local Config = require("avante.config")
---@class avante.ui.Confirm
-... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/input/init.lua | Lua | local Utils = require("avante.utils")
---@class avante.ui.InputOption
---@field provider avante.InputProvider
---@field title string
---@field default string | nil
---@field completion string | nil
---@field provider_opts table | nil
---@field on_submit fun(result: string | nil)
---@field conceal boolean | nil -- Whet... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/input/providers/dressing.lua | Lua | local api = vim.api
local fn = vim.fn
local M = {}
---@param input avante.ui.Input
function M.show(input)
local ok, dressing_input = pcall(require, "dressing.input")
if not ok then
vim.notify("dressing.nvim not found, falling back to native input", vim.log.levels.WARN)
require("avante.ui.input.providers.n... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/input/providers/native.lua | Lua | local M = {}
---@param input avante.ui.Input
function M.show(input)
local opts = {
prompt = input.title,
default = input.default,
completion = input.completion,
}
-- Note: Native vim.ui.input doesn't support concealing
-- For password input, users should use dressing or snacks providers
if input... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/input/providers/snacks.lua | Lua | local M = {}
---@param input avante.ui.Input
function M.show(input)
local ok, snacks_input = pcall(require, "snacks.input")
if not ok then
vim.notify("snacks.nvim not found, falling back to native input", vim.log.levels.WARN)
require("avante.ui.input.providers.native").show(input)
return
end
local... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/line.lua | Lua | ---@alias avante.ui.LineSection table
---
---@class avante.ui.Line
---@field sections avante.ui.LineSection[]
local M = {}
M.__index = M
---@param sections avante.ui.LineSection[]
function M:new(sections)
local this = setmetatable({}, M)
this.sections = sections
return this
end
---@param ns_id number
---@param ... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/prompt_input.lua | Lua | local api = vim.api
local fn = vim.fn
local Config = require("avante.config")
local Utils = require("avante.utils")
---@class avante.ui.PromptInput
---@field bufnr integer | nil
---@field winid integer | nil
---@field win_opts table
---@field shortcuts_hints_winid integer | nil
---@field augroup integer | nil
---@fiel... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/selector/init.lua | Lua | local Utils = require("avante.utils")
---@class avante.ui.SelectorItem
---@field id string
---@field title string
---@class avante.ui.SelectorOption
---@field provider avante.SelectorProvider
---@field title string
---@field items avante.ui.SelectorItem[]
---@field default_item_id string | nil
---@field selected_item... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
lua/avante/ui/selector/providers/fzf_lua.lua | Lua | local Utils = require("avante.utils")
local M = {}
---@param selector avante.ui.Selector
function M.show(selector)
local success, fzf_lua = pcall(require, "fzf-lua")
if not success then
Utils.error("fzf-lua is not installed. Please install fzf-lua to use it as a file selector.")
return
end
local title... | yetone/avante.nvim | 17,366 | Use your Neovim like using Cursor AI IDE! | Lua | yetone | yetone | Isoform |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.