Other Configuration Options
Log Level
IMPORTANT
By default, logs are stored at ~/.local/state/nvim/codecompanion.log
When it comes to debugging, you can change the level of logging which takes place in the plugin as follows:
lua
require("codecompanion").setup({
opts = {
log_level = "ERROR", -- TRACE|DEBUG|ERROR|INFO
},
}),
Default Language
If you use the default system prompt, you can specify which language an LLM should respond in by changing the opts.language
option:
lua
require("codecompanion").setup({
opts = {
language = "English",
},
}),
Of course, if you have your own system prompt you can specify your own language for the LLM to respond in.
Sending Code
IMPORTANT
Whilst the plugin makes every attempt to prevent code from being sent to the LLM, use this option at your own risk
You can prevent any code from being sent to the LLM with:
lua
require("codecompanion").setup({
opts = {
send_code = false,
},
}),
Highlight Groups
The plugin sets the following highlight groups during setup:
CodeCompanionChatHeader
- The headers in the chat bufferCodeCompanionChatSeparator
- Separator between headings in the chat bufferCodeCompanionChatTokens
- Virtual text in the chat buffer showing the token countCodeCompanionChatTool
- Tools in the chat bufferCodeCompanionChatToolGroups
- Tool groups in the chat bufferCodeCompanionChatVariable
- Variables in the chat bufferCodeCompanionVirtualText
- All other virtual text in the plugin