assistant/codecompanion-nvim: fix nvim-cmp and defaults

This commit is contained in:
army castillo 2025-04-05 23:50:41 -04:00
parent e2b3daa6f8
commit da57f955df
3 changed files with 18 additions and 2 deletions

View file

@ -198,6 +198,7 @@
Inspiration from `vim.languages.clang.dap` implementation.
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
- Add [codecompanion.nvim] plugin under `vim.assistant.codecompanion-nvim`.
- Fix [codecompanion-nvim] plugin: nvim-cmp error and setupOpts defaults.
[nezia1](https://github.com/nezia1):

View file

@ -9,7 +9,12 @@ in {
setupOpts = mkPluginSetupOption "codecompanion-nvim" {
opts = {
send_code = mkEnableOption "code from being sent to the LLM.";
send_code =
mkEnableOption ""
// {
default = true;
description = "code from being sent to the LLM.";
};
log_level = mkOption {
type = enum ["DEBUG" "INFO" "ERROR" "TRACE"];
@ -64,7 +69,12 @@ in {
};
chat = {
auto_scroll = mkEnableOption "automatic page scrolling.";
auto_scroll =
mkEnableOption ""
// {
default = true;
description = "automatic page scrolling.";
};
show_settings = mkEnableOption ''
LLM settings to appear at the top of the chat buffer.

View file

@ -22,6 +22,11 @@ in {
};
treesitter.enable = true;
autocomplete.nvim-cmp = {
sources = {codecompanion-nvim = "[codecompanion]";};
sourcePlugins = ["codecompanion-nvim"];
};
};
};
}