docs: fix doc types. Add lua type to opts in readme (#2200)

* docs: fix doc types. Add lua type to `opts` in readme

* [pre-commit.ci lite] apply automatic fixes

* chore: fix type error in sidebar.lua

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
This commit is contained in:
Avinash Thakur
2025-06-17 13:39:12 +05:30
committed by GitHub
parent b52a89cb08
commit cf87220dff
4 changed files with 16 additions and 0 deletions

View File

@@ -21,8 +21,10 @@ local M = {}
M._defaults = {
debug = false,
---@alias avante.Mode "agentic" | "legacy"
---@type avante.Mode
mode = "agentic",
---@alias avante.ProviderName "claude" | "openai" | "azure" | "gemini" | "vertex" | "cohere" | "copilot" | "bedrock" | "ollama" | string
---@type avante.ProviderName
provider = "claude",
-- WARNING: Since auto-suggestions are a high-frequency operation and therefore expensive,
-- currently designating it as `copilot` provider is dangerous because: https://github.com/yetone/avante.nvim/issues/1048
@@ -30,6 +32,7 @@ M._defaults = {
auto_suggestions_provider = nil,
memory_summary_provider = nil,
---@alias Tokenizer "tiktoken" | "hf"
---@type Tokenizer
-- Used for counting tokens and encoding text.
-- By default, we will use tiktoken.
-- For most providers that we support we will determine this automatically.
@@ -518,6 +521,7 @@ M._defaults = {
},
windows = {
---@alias AvantePosition "right" | "left" | "top" | "bottom" | "smart"
---@type AvantePosition
position = "right",
fillchars = "eob: ",
wrap = true, -- similar to vim.o.wrap
@@ -541,6 +545,7 @@ M._defaults = {
border = { " ", " ", " ", " ", " ", " ", " ", " " },
start_insert = true, -- Start insert mode when opening the ask window
---@alias AvanteInitialDiff "ours" | "theirs"
---@type AvanteInitialDiff
focus_on_apply = "ours", -- which diff to focus after applying
},
},
@@ -569,6 +574,7 @@ M._defaults = {
},
selector = {
---@alias avante.SelectorProvider "native" | "fzf_lua" | "mini_pick" | "snacks" | "telescope" | fun(selector: avante.ui.Selector): nil
---@type avante.SelectorProvider
provider = "native",
provider_opts = {},
exclude_auto_select = {}, -- List of items to exclude from auto selection

View File

@@ -1613,6 +1613,7 @@ local function calculate_config_window_position()
end
end
---@cast position -"smart", -string
return position
end