Skip to content

Commit d4c1bfe

Browse files
kantorddanbarr
andauthored
add documentation for avante.nvim (#86)
* add documentation for avante.nvim * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * Update docs/integrations/avante.mdx Co-authored-by: Dan Barr <[email protected]> * enable lua highlihgting --------- Co-authored-by: Dan Barr <[email protected]>
1 parent 59e3725 commit d4c1bfe

File tree

2 files changed

+80
-1
lines changed

2 files changed

+80
-1
lines changed

docs/integrations/avante.mdx

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Use CodeGate with avante.nvim
3+
description: Configure the `avante.nvim` plugin for Neovim
4+
sidebar_label: avante.nvim
5+
sidebar_position: 15
6+
---
7+
8+
**[avante.nvim](https://github.com/yetone/avante.nvim)** is a Neovim plugin that
9+
provides a Cursor-like user experience. It integrates with multiple AI providers
10+
(e.g. Claude and OpenAI).
11+
12+
## Install avante.nvim
13+
14+
Install the **avante.nvim** plugin using your preferred plugin manager. For
15+
instructions, consult **avante.nvim**'s
16+
[documentation](https://github.com/yetone/avante.nvim?tab=readme-ov-file#installation).
17+
18+
## Configure CodeGate with avante.nvim
19+
20+
Consult **avante.nvim**'s documentation for specific examples on customizing
21+
your configuration using your preferred plugin manager.
22+
23+
Using `lazy.nvim` (recommended) add the following configuration to enable
24+
CodeGate with **avante.nvim**:
25+
26+
```lua
27+
{
28+
"yetone/avante.nvim",
29+
-- ... etc ...
30+
opts = {
31+
-- your provider configuration ...
32+
provider = "openai",
33+
openai = {
34+
endpoint = "http://localhost:8989/openai", -- use the endpoint matching your LLM provider
35+
model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
36+
timeout = 30000, -- timeout in milliseconds
37+
temperature = 0, -- adjust if needed
38+
max_tokens = 4096,
39+
},
40+
},
41+
-- ... etc ...
42+
}
43+
```
44+
45+
:::note
46+
47+
**avante.nvim** does not yet support _fill-in-the-middle_ completions. You have
48+
to configure your fill-in-the-middle completion plugin separately.
49+
50+
:::
51+
52+
### Verifying configuration
53+
54+
To verify the configuration, type `:AvanteChat` to start the **avante.nvim**
55+
plugin. You should see the **avante.nvim** UI appear in the Neovim window.
56+
57+
Type and send the following message:
58+
59+
```
60+
codegate version
61+
```
62+
63+
If CodeGate is configured correctly, you should see a response from the CodeGate
64+
server.
65+
66+
### Model muxing
67+
68+
To take advantage of CodeGate's [model muxing feature](../features/muxing.md),
69+
use **avante.nvim**'s OpenAI provider with the following configuration:
70+
71+
```lua
72+
openai = {
73+
endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint
74+
model = "gpt-4o", -- the actual model is determined by your CodeGate workspace
75+
timeout = 30000, -- timeout in milliseconds
76+
temperature = 0, -- adjust if needed
77+
max_tokens = 4096,
78+
},
79+
```

docusaurus.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ const config: Config = {
182182
prism: {
183183
theme: prismThemes.github,
184184
darkTheme: prismThemes.dracula,
185-
additionalLanguages: ['bash', 'json', 'powershell', 'docker'],
185+
additionalLanguages: ['bash', 'json', 'powershell', 'docker', 'lua'],
186186
},
187187
mermaid: {
188188
theme: { light: 'neutral', dark: 'dark' },

0 commit comments

Comments
 (0)