|
1 | | -*codecompanion.txt* For NVIM v0.11 Last change: 2025 November 19 |
| 1 | +*codecompanion.txt* For NVIM v0.11 Last change: 2025 November 23 |
2 | 2 |
|
3 | 3 | ============================================================================== |
4 | 4 | Table of Contents *codecompanion-table-of-contents* |
@@ -878,10 +878,9 @@ The configuration for both types of adapters is exactly the same, however they |
878 | 878 | sit within their own tables (`adapters.http.*` and `adapters.acp.*`) and have |
879 | 879 | different options available. HTTP adapters use `models` to allow users to |
880 | 880 | select the specific LLM they’d like to interact with. ACP adapters use |
881 | | -`commands` to allow users to customize their interaction with agents |
882 | | -(e.g. enabling `yolo` mode). As there is a lot of shared functionality between |
883 | | -the two adapters, it is recommend that you read this page alongside the ACP |
884 | | -one. |
| 881 | +`commands` to allow users to customize their interaction with agents (e.g.� |
| 882 | +enabling `yolo` mode). As there is a lot of shared functionality between the |
| 883 | +two adapters, it is recommend that you read this page alongside the ACP one. |
885 | 884 |
|
886 | 885 |
|
887 | 886 | CHANGING THE DEFAULT ADAPTER ~ |
@@ -913,7 +912,7 @@ the adapter’s URL, headers, parameters and other fields at runtime. |
913 | 912 |
|
914 | 913 | Supported `env` value types: - **Plain environment variable name (string)**: if |
915 | 914 | the value is the name of an environment variable that has already been set |
916 | | -(e.g. `"HOME"` or `"GEMINI_API_KEY"`), the plugin will read the value. - |
| 915 | +(e.g.� `"HOME"` or `"GEMINI_API_KEY"`), the plugin will read the value. - |
917 | 916 | **Command (string prefixed with cmd:)**: any value that starts with `cmd:` will |
918 | 917 | be executed via the shell. Example: `"cmd:op read |
919 | 918 | op://personal/Gemini/credential --no-newline"`. - **Function**: you can provide |
@@ -2214,8 +2213,26 @@ The inline assistant supports keymaps for accepting or rejecting changes: |
2214 | 2213 | }) |
2215 | 2214 | < |
2216 | 2215 |
|
2217 | | -In this example, `<leader>a` (or `ga` on some keyboards) accepts inline |
2218 | | -changes, while `gr` rejects them. |
| 2216 | +In this example, `ga` accepts inline changes, while `gr` rejects them. |
| 2217 | + |
| 2218 | +You can also cancel an inline request with: |
| 2219 | + |
| 2220 | +>lua |
| 2221 | + require("codecompanion").setup({ |
| 2222 | + strategies = { |
| 2223 | + inline = { |
| 2224 | + keymaps = { |
| 2225 | + stop = { |
| 2226 | + modes = { n = "q" }, |
| 2227 | + index = 4, |
| 2228 | + callback = "keymaps.stop", |
| 2229 | + description = "Stop request", |
| 2230 | + }, |
| 2231 | + }, |
| 2232 | + }, |
| 2233 | + }, |
| 2234 | + }) |
| 2235 | +< |
2219 | 2236 |
|
2220 | 2237 |
|
2221 | 2238 | VARIABLES ~ |
@@ -2952,7 +2969,7 @@ The fastest way to copy an LLM’s code output is with `gy`. This will yank the |
2952 | 2969 | nearest codeblock. |
2953 | 2970 |
|
2954 | 2971 |
|
2955 | | -APPLYING AN LLM’S EDITS TO A BUFFER OR FILE ~ |
| 2972 | +APPLYING AN LLM�S EDITS TO A BUFFER OR FILE ~ |
2956 | 2973 |
|
2957 | 2974 | The |codecompanion-usage-chat-buffer-tools-files| tool, combined with the |
2958 | 2975 | |codecompanion-usage-chat-buffer-variables.html-buffer| variable or |
@@ -5020,7 +5037,7 @@ These handlers manage tool/function calling: |
5020 | 5037 | as a great reference to understand how they’re working with the output of the |
5021 | 5038 | API |
5022 | 5039 |
|
5023 | | -OPENAI’S API OUTPUT |
| 5040 | +OPENAI�S API OUTPUT |
5024 | 5041 |
|
5025 | 5042 | If we reference the OpenAI documentation |
5026 | 5043 | <https://platform.openai.com/docs/guides/text-generation/chat-completions-api> |
@@ -6927,7 +6944,7 @@ tool to function. In the case of Anthropic, we insert additional headers. |
6927 | 6944 | < |
6928 | 6945 |
|
6929 | 6946 | Some adapter tools can be a `hybrid` in terms of their implementation. That is, |
6930 | | -they’re an adapter tool that requires a client-side component (i.e. a |
| 6947 | +they’re an adapter tool that requires a client-side component (i.e.� a |
6931 | 6948 | built-in tool). This is the case for the |
6932 | 6949 | |codecompanion-usage-chat-buffer-tools-memory| tool from Anthropic. To allow |
6933 | 6950 | for this, ensure that the tool definition in `available_tools` has |
|
0 commit comments