From bf9cc1d0661567d7689f5bc12d6e24985ff2e1fb Mon Sep 17 00:00:00 2001 From: Daniel Kantor Date: Tue, 18 Feb 2025 15:49:43 +0100 Subject: [PATCH 01/10] add documentation for avante.nvim --- docs/integrations/avante.mdx | 79 ++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 docs/integrations/avante.mdx diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx new file mode 100644 index 0000000..490b6fc --- /dev/null +++ b/docs/integrations/avante.mdx @@ -0,0 +1,79 @@ +--- +title: Use CodeGate with avante.nvim +description: Configure the `avante.nvim` plugin for Neovim +sidebar_label: avante.nvim +sidebar_position: 30 +--- + +**avante.nvim** is a Neovim plugin that provides a +[Cursor](https://www.cursor.com)-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](https://github.com/yetone/avante.nvim?tab=readme-ov-file#installation). + +## 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**: + +```lua +{ + "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 configurtion, 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](/features/muxing), use +**avante.nvim**'s OpenAI provider with the following configuration: + +```lua +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, +}, +``` From 33bb13670f2f784657e18d0180cda6b773bcdaa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:35:41 +0100 Subject: [PATCH 02/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 490b6fc..5f56c20 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -51,7 +51,7 @@ to configure your fill-in-the-middle completion plugin separately. ### Verifying configuration -To verify the configurtion, type `:AvanteChat` to start the **avante.nvim** +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: From 8595fc1eb0d56184db808f06a6cec6dcc03e1d70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:36:51 +0100 Subject: [PATCH 03/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 5f56c20..087d3d8 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -2,7 +2,7 @@ title: Use CodeGate with avante.nvim description: Configure the `avante.nvim` plugin for Neovim sidebar_label: avante.nvim -sidebar_position: 30 +sidebar_position: 15 --- **avante.nvim** is a Neovim plugin that provides a From e0f4eb40ce05f52e1fa4e2d29f5693edd0ba32cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:37:14 +0100 Subject: [PATCH 04/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 087d3d8..fbe2dc8 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -5,9 +5,9 @@ sidebar_label: avante.nvim sidebar_position: 15 --- -**avante.nvim** is a Neovim plugin that provides a -[Cursor](https://www.cursor.com)-like user experience. It integrates with -multiple AI providers (e.g. Claude and OpenAI). +**[avante.nvim](https://github.com/yetone/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 From 302c0fc42ef29b7e7d70b28b7c098af2c8f5d32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:37:27 +0100 Subject: [PATCH 05/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index fbe2dc8..9bf89e9 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -70,7 +70,7 @@ To take advantage of CodeGate's [model muxing feature](/features/muxing), use ```lua openai = { - endpoint = "http://localhost:8989/v1/mux", -- use the endpoint matching your LLM provider + endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint model = "gpt-4o", timeout = 30000, -- timeout in milliseconds temperature = 0, -- adjust if needed From a2c0c2887d42a8da4375467a5900b1faba1eeb0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:37:35 +0100 Subject: [PATCH 06/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 9bf89e9..10c3786 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -63,7 +63,7 @@ codegate version If CodeGate is configured correctly, you should see a response from the CodeGate server. -### Model Muxing +### Model muxing To take advantage of CodeGate's [model muxing feature](/features/muxing), use **avante.nvim**'s OpenAI provider with the following configuration: From a1fd434f5f2f2eafafe7082ac6e79dd7e5f18090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:37:43 +0100 Subject: [PATCH 07/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 10c3786..1b6fb2d 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -65,8 +65,8 @@ server. ### Model muxing -To take advantage of CodeGate's [model muxing feature](/features/muxing), use -**avante.nvim**'s OpenAI provider with the following configuration: +To take advantage of CodeGate's [model muxing feature](../features/muxing.md), +use **avante.nvim**'s OpenAI provider with the following configuration: ```lua openai = { From 45a3fe3bfcbd38682b9b89331a37662451a1dba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:38:06 +0100 Subject: [PATCH 08/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 1b6fb2d..373aa8d 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -71,7 +71,7 @@ use **avante.nvim**'s OpenAI provider with the following configuration: ```lua openai = { endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint - model = "gpt-4o", + model = "gpt-4o", -- the actual model is determined by your CodeGate workspace timeout = 30000, -- timeout in milliseconds temperature = 0, -- adjust if needed max_tokens = 4096, From de62058ee31c0ee272e2cb4f91c0c6b33a8b4281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20K=C3=A1ntor?= Date: Tue, 18 Feb 2025 17:38:14 +0100 Subject: [PATCH 09/10] Update docs/integrations/avante.mdx Co-authored-by: Dan Barr --- docs/integrations/avante.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/avante.mdx b/docs/integrations/avante.mdx index 373aa8d..5b89a9f 100644 --- a/docs/integrations/avante.mdx +++ b/docs/integrations/avante.mdx @@ -28,7 +28,7 @@ CodeGate with **avante.nvim**: "yetone/avante.nvim", -- ... etc ... opts = { - -- your provider configuratio ... + -- your provider configuration ... provider = "openai", openai = { endpoint = "http://localhost:8989/openai", -- use the endpoint matching your LLM provider From 96d308efcf3605f8c096a6242f16f148cfb7f779 Mon Sep 17 00:00:00 2001 From: Daniel Kantor Date: Tue, 18 Feb 2025 18:15:22 +0100 Subject: [PATCH 10/10] enable lua highlihgting --- docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index dff66c5..2a6b5e4 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -182,7 +182,7 @@ const config: Config = { prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula, - additionalLanguages: ['bash', 'json', 'powershell', 'docker'], + additionalLanguages: ['bash', 'json', 'powershell', 'docker', 'lua'], }, mermaid: { theme: { light: 'neutral', dark: 'dark' },