mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-12 08:25:30 +00:00
assistant/codecompanion-nvim: PR review revisions
This commit is contained in:
parent
65f40f554d
commit
174d83d721
3 changed files with 91 additions and 42 deletions
|
|
@ -174,7 +174,7 @@
|
||||||
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
|
- Add [leetcode.nvim] plugin under `vim.utility.leetcode-nvim`.
|
||||||
- Add [codecompanion.nvim] plugin under `vim.assistant.codecompanion-nvim`.
|
- Add [codecompanion.nvim] plugin under `vim.assistant.codecompanion-nvim`.
|
||||||
|
|
||||||
[nezia1](https://github.com/nezia1)
|
[nezia1](https://github.com/nezia1):
|
||||||
|
|
||||||
- Add support for [nixd](https://github.com/nix-community/nixd) language server.
|
- Add support for [nixd](https://github.com/nix-community/nixd) language server.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,12 +12,7 @@ in {
|
||||||
send_code = mkEnableOption "code from being sent to the LLM.";
|
send_code = mkEnableOption "code from being sent to the LLM.";
|
||||||
|
|
||||||
log_level = mkOption {
|
log_level = mkOption {
|
||||||
type = enum [
|
type = enum ["DEBUG" "INFO" "ERROR" "TRACE"];
|
||||||
"DEBUG"
|
|
||||||
"INFO"
|
|
||||||
"ERROR"
|
|
||||||
"TRACE"
|
|
||||||
];
|
|
||||||
default = "ERROR";
|
default = "ERROR";
|
||||||
description = "Change the level of logging.";
|
description = "Change the level of logging.";
|
||||||
};
|
};
|
||||||
|
|
@ -31,28 +26,30 @@ in {
|
||||||
|
|
||||||
display = {
|
display = {
|
||||||
diff = {
|
diff = {
|
||||||
enabled = mkEnableOption "a diff to be created so you can see the changes made by the LLM." // {default = true;};
|
enabled =
|
||||||
|
mkEnableOption ""
|
||||||
|
// {
|
||||||
|
default = true;
|
||||||
|
description = "a diff view to see the changes made by the LLM.";
|
||||||
|
};
|
||||||
|
|
||||||
close_chat_at = mkOption {
|
close_chat_at = mkOption {
|
||||||
type = int;
|
type = int;
|
||||||
default = 240;
|
default = 240;
|
||||||
description = "Close an open chat buffer if the total columns of your display are less than...";
|
description = ''
|
||||||
|
Close an open chat buffer if the
|
||||||
|
total columns of your display are less than...
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
layout = mkOption {
|
layout = mkOption {
|
||||||
type = enum [
|
type = enum ["vertical" "horizontal"];
|
||||||
"vertical"
|
|
||||||
"horizontal"
|
|
||||||
];
|
|
||||||
default = "vertical";
|
default = "vertical";
|
||||||
description = "Type of split for default provider.";
|
description = "Type of split for default provider.";
|
||||||
};
|
};
|
||||||
|
|
||||||
provider = mkOption {
|
provider = mkOption {
|
||||||
type = enum [
|
type = enum ["default" "mini_diff"];
|
||||||
"default"
|
|
||||||
"mini_diff"
|
|
||||||
];
|
|
||||||
default = "default";
|
default = "default";
|
||||||
description = "The preferred kind of provider.";
|
description = "The preferred kind of provider.";
|
||||||
};
|
};
|
||||||
|
|
@ -60,24 +57,44 @@ in {
|
||||||
|
|
||||||
inline = {
|
inline = {
|
||||||
layout = mkOption {
|
layout = mkOption {
|
||||||
type = enum [
|
type = enum ["vertical" "horizontal" "buffer"];
|
||||||
"vertical"
|
|
||||||
"horizontal"
|
|
||||||
"buffer"
|
|
||||||
];
|
|
||||||
default = "vertical";
|
default = "vertical";
|
||||||
description = "Customize how output is created in new buffer.";
|
description = "Customize how output is created in new buffer.";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
chat = {
|
chat = {
|
||||||
show_header_separator = mkEnableOption "show header separators in the chat buffer? Set this to false if you're using an external markdown formatting plugin.";
|
|
||||||
show_references = mkEnableOption "show references (from slash commands and variables) in the chat buffer." // {default = true;};
|
|
||||||
show_settings = mkEnableOption "show LLM settings at the top of the chat buffer.";
|
|
||||||
show_token_count = mkEnableOption "show the token count for each response." // {default = true;};
|
|
||||||
start_in_insert_mode = mkEnableOption "open the chat buffer in insert mode.";
|
|
||||||
auto_scroll = mkEnableOption "automatic page scrolling.";
|
auto_scroll = mkEnableOption "automatic page scrolling.";
|
||||||
|
|
||||||
|
show_settings = mkEnableOption ''
|
||||||
|
LLM settings to appear at the top of the chat buffer.
|
||||||
|
'';
|
||||||
|
|
||||||
|
start_in_insert_mode = mkEnableOption ''
|
||||||
|
opening the chat buffer in insert mode.
|
||||||
|
'';
|
||||||
|
|
||||||
|
show_header_separator = mkEnableOption ''
|
||||||
|
header separators in the chat buffer.
|
||||||
|
|
||||||
|
Set this to false if you're using an
|
||||||
|
external markdown formatting plugin.
|
||||||
|
'';
|
||||||
|
|
||||||
|
show_references =
|
||||||
|
mkEnableOption ""
|
||||||
|
// {
|
||||||
|
default = true;
|
||||||
|
description = "references in the chat buffer.";
|
||||||
|
};
|
||||||
|
|
||||||
|
show_token_count =
|
||||||
|
mkEnableOption ""
|
||||||
|
// {
|
||||||
|
default = true;
|
||||||
|
description = "the token count for each response.";
|
||||||
|
};
|
||||||
|
|
||||||
intro_message = mkOption {
|
intro_message = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "Welcome to CodeCompanion ✨! Press ? for options.";
|
default = "Welcome to CodeCompanion ✨! Press ? for options.";
|
||||||
|
|
@ -87,7 +104,10 @@ in {
|
||||||
separator = mkOption {
|
separator = mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "─";
|
default = "─";
|
||||||
description = "The separator between the different messages in the chat buffer.";
|
description = ''
|
||||||
|
The separator between the
|
||||||
|
different messages in the chat buffer.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
icons = {
|
icons = {
|
||||||
|
|
@ -125,18 +145,27 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
provider = mkOption {
|
provider = mkOption {
|
||||||
type = enum [
|
type = enum ["default" "telescope" "mini_pick"];
|
||||||
"default"
|
|
||||||
"telescope"
|
|
||||||
"mini_pick"
|
|
||||||
];
|
|
||||||
default = "default";
|
default = "default";
|
||||||
description = "Provider used for the action palette.";
|
description = "Provider used for the action palette.";
|
||||||
};
|
};
|
||||||
|
|
||||||
opts = {
|
opts = {
|
||||||
show_default_actions = mkEnableOption "show the default actions in the action palette?" // {default = true;};
|
show_default_actions =
|
||||||
show_default_prompt_library = mkEnableOption "show the default prompt library in the action palette?" // {default = true;};
|
mkEnableOption ""
|
||||||
|
// {
|
||||||
|
default = true;
|
||||||
|
description = "showing default actions in the action palette.";
|
||||||
|
};
|
||||||
|
|
||||||
|
show_default_prompt_library =
|
||||||
|
mkEnableOption ""
|
||||||
|
// {
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
showing default prompt library in the action palette.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -164,25 +193,38 @@ in {
|
||||||
variables = mkOption {
|
variables = mkOption {
|
||||||
type = nullOr luaInline;
|
type = nullOr luaInline;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Define your own variables to share specific content.";
|
description = ''
|
||||||
|
Define your own variables
|
||||||
|
to share specific content.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
slash_commands = mkOption {
|
slash_commands = mkOption {
|
||||||
type = nullOr luaInline;
|
type = nullOr luaInline;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Slash Commands (invoked with /) let you dynamically insert context into the chat buffer, such as file contents or date/time.";
|
description = ''
|
||||||
|
Slash Commands (invoked with /) let you dynamically
|
||||||
|
insert context into the chat buffer,
|
||||||
|
such as file contents or date/time.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
tools = mkOption {
|
tools = mkOption {
|
||||||
type = nullOr attrs;
|
type = nullOr attrs;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Tools perform specific tasks (e.g., running shell commands, editing buffers, etc.) when invoked by an LLM.";
|
description = ''
|
||||||
|
Configure tools to perform specific
|
||||||
|
tasks when invoked by an LLM.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
roles = mkOption {
|
roles = mkOption {
|
||||||
type = nullOr luaInline;
|
type = nullOr luaInline;
|
||||||
default = null;
|
default = null;
|
||||||
description = "The chat buffer places user and LLM responses under a H2 header. These can be customized in the configuration";
|
description = ''
|
||||||
|
The chat buffer places user and LLM responses under a H2 header.
|
||||||
|
These can be customized in the configuration.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -196,7 +238,10 @@ in {
|
||||||
variables = mkOption {
|
variables = mkOption {
|
||||||
type = nullOr luaInline;
|
type = nullOr luaInline;
|
||||||
default = null;
|
default = null;
|
||||||
description = "Define your own variables to share specific content.";
|
description = ''
|
||||||
|
Define your own variables
|
||||||
|
to share specific content.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
|
@ -222,7 +267,10 @@ in {
|
||||||
prompt_library = mkOption {
|
prompt_library = mkOption {
|
||||||
type = nullOr attrs;
|
type = nullOr attrs;
|
||||||
default = null;
|
default = null;
|
||||||
description = "A prompt library is a collection of prompts that can be used in the action palette.";
|
description = ''
|
||||||
|
A prompt library is a collection of prompts
|
||||||
|
that can be used in the action palette.
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ in {
|
||||||
vim = {
|
vim = {
|
||||||
startPlugins = [
|
startPlugins = [
|
||||||
"plenary-nvim"
|
"plenary-nvim"
|
||||||
"nvim-treesitter"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
lazy.plugins = {
|
lazy.plugins = {
|
||||||
|
|
@ -21,6 +20,8 @@ in {
|
||||||
inherit (cfg) setupOpts;
|
inherit (cfg) setupOpts;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
treesitter.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue