Skip to main content

Use CodeGate with avante.nvim

avante.nvim is a Neovim plugin that provides a Cursor-like user experience. It integrates with multiple AI providers (e.g. Claude and OpenAI).

Install avante.nvim

Install the avante.nvim plugin using your preferred plugin manager. For instructions, consult avante.nvim's documentation.

Configure CodeGate with avante.nvim

Consult avante.nvim's documentation for specific examples on customizing your configuration using your preferred plugin manager.

Using lazy.nvim (recommended) add the following configuration to enable CodeGate with avante.nvim:

{
"yetone/avante.nvim",
-- ... etc ...
opts = {
-- your provider configuratio ...
provider = "openai",
openai = {
endpoint = "http://localhost:8989/openai", -- use the endpoint matching your LLM provider
model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
timeout = 30000, -- timeout in milliseconds
temperature = 0, -- adjust if needed
max_tokens = 4096,
},
},
-- ... etc ...
}
note

avante.nvim does not yet support fill-in-the-middle completions. You have to configure your fill-in-the-middle completion plugin separately.

Verifying configuration

To verify the configuration, type :AvanteChat to start the avante.nvim plugin. You should see the avante.nvim UI appear in the Neovim window.

Type and send the following message:

codegate version

If CodeGate is configured correctly, you should see a response from the CodeGate server.

Model Muxing

To take advantage of CodeGate's model muxing feature, use avante.nvim's OpenAI provider with the following configuration:

openai = {
endpoint = "http://localhost:8989/v1/mux", -- use the endpoint matching your LLM provider
model = "gpt-4o",
timeout = 30000, -- timeout in milliseconds
temperature = 0, -- adjust if needed
max_tokens = 4096,
},