Остання активність 1730982715

Версія 866d144e9b1b8fb7ad6a2547dff68b94748b14fb

avante.nvim-5.lua Неформатований
1{
2 ---@alias Provider "claude" | "openai" | "azure" | "gemini" | "cohere" | "copilot" | string
3 provider = "claude", -- Recommend using Claude
4 auto_suggestions_provider = "claude", -- Since auto-suggestions are a high-frequency operation and therefore expensive, it is recommended to specify an inexpensive provider or even a free provider: copilot
5 claude = {
6 endpoint = "https://api.anthropic.com",
7 model = "claude-3-5-sonnet-20241022",
8 temperature = 0,
9 max_tokens = 4096,
10 },
11 behaviour = {
12 auto_suggestions = false, -- Experimental stage
13 auto_set_highlight_group = true,
14 auto_set_keymaps = true,
15 auto_apply_diff_after_generation = false,
16 support_paste_from_clipboard = false,
17 },
18 mappings = {
19 --- @class AvanteConflictMappings
20 diff = {
21 ours = "co",
22 theirs = "ct",
23 all_theirs = "ca",
24 both = "cb",
25 cursor = "cc",
26 next = "]x",
27 prev = "[x",
28 },
29 suggestion = {
30 accept = "<M-l>",
31 next = "<M-]>",
32 prev = "<M-[>",
33 dismiss = "<C-]>",
34 },
35 jump = {
36 next = "]]",
37 prev = "[[",
38 },
39 submit = {
40 normal = "<CR>",
41 insert = "<C-s>",
42 },
43 sidebar = {
44 apply_all = "A",
45 apply_cursor = "a",
46 switch_windows = "<Tab>",
47 reverse_switch_windows = "<S-Tab>",
48 },
49 },
50 hints = { enabled = true },
51 windows = {
52 ---@type "right" | "left" | "top" | "bottom"
53 position = "right", -- the position of the sidebar
54 wrap = true, -- similar to vim.o.wrap
55 width = 30, -- default % based on available width
56 sidebar_header = {
57 enabled = true, -- true, false to enable/disable the header
58 align = "center", -- left, center, right for title
59 rounded = true,
60 },
61 input = {
62 prefix = "> ",
63 height = 8, -- Height of the input window in vertical layout
64 },
65 edit = {
66 border = "rounded",
67 start_insert = true, -- Start insert mode when opening the edit window
68 },
69 ask = {
70 floating = false, -- Open the 'AvanteAsk' prompt in a floating window
71 start_insert = true, -- Start insert mode when opening the ask window
72 border = "rounded",
73 ---@type "ours" | "theirs"
74 focus_on_apply = "ours", -- which diff to focus after applying
75 },
76 },
77 highlights = {
78 ---@type AvanteConflictHighlights
79 diff = {
80 current = "DiffText",
81 incoming = "DiffAdd",
82 },
83 },
84 --- @class AvanteConflictUserConfig
85 diff = {
86 autojump = true,
87 ---@type string | fun(): any
88 list_opener = "copen",
89 --- Override the 'timeoutlen' setting while hovering over a diff (see :help timeoutlen).
90 --- Helps to avoid entering operator-pending mode with diff mappings starting with `c`.
91 --- Disable by setting to -1.
92 override_timeoutlen = 500,
93 },
94}