-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
assistant/codecompanion-nvim: init #707
base: main
Are you sure you want to change the base?
assistant/codecompanion-nvim: init #707
Conversation
|
||
[nezia1](https://github.com/nezia1): | ||
[nezia1](https://github.com/nezia1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a mistake and I will fix this. Before doing so, I'll wait to see if there are any changes requested throughout the rest of the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've requested a few stylistic changes. Looks good overall, but two things I want to mention are:
-
If the enums are not likely to change, please in-line the lists. I understand that some formatters, like nixfmt, prefer unfolding lists but I find them to be distracting. They also introduce an uglier syntax.
-
For option descriptions, there also seems to be some inconsistency, i.e., some of the descriptions have periods at the end, but others don't. I'd appreciate if you could make sure that they remain consistent.
Nothing else comes to mind, thank you for your efforts.
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."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those will yield some grammatically incorrect descriptions. mkEnableOption
function is a wrapper around mkOption
which automatically prepends "Whether to enable" to the description you pass it. It will produce, for examaple
"Whether to enable show references"
in the documentation. Additionally, I'd appreciate if you could make sure that the description lines do not exceed 80 characters per line. If it is longer, you may use multi-line strings. For example:
show_header_separator = mkEnableOption ''
show header separators in the chat buffer?
Set this to false if you're using an external
markdown formatting plugin.
'';
vim = { | ||
startPlugins = [ | ||
"plenary-nvim" | ||
"nvim-treesitter" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't a toggle for plenary, but you may instead explicitly enable the treesitter module when this plugin is enabled. That should be preferred over putting dependencies in startPlugins in ways that cannot be overriden.
|
||
opts = { | ||
show_default_actions = mkEnableOption "show the default actions in the action palette?" // {default = true;}; | ||
show_default_prompt_library = mkEnableOption "show the default prompt library in the action palette?" // {default = true;}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NotAShelf For situations where the mkEnableOption has // {default = true;};
, what is the preferred way to reduce the line size? Should I change this to a mkOption type = bool instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description can be a multi-line string regardless.
mkEnableOption "" // {
default = true;
description = ''
lines
more lines
'';
}
is how its usually done in nvf, but a boolean mkOption
is fine too.
Adding codecompanion.nvim plugin for a more customizable coding assistant experience.
Basic functionality (adding/changing adapters, chat buffer, inline, buffer, prompt library) have been tested and work, however, another set of eyes would be nice as well for other implemented functions. I will continue testing, but any help (from anyone) to speed up testing would be appreciated.
closes issue #671
Sanity Checking
nix fmt
).#nix
(default package).#maximal
- due to unrelated issue regardingprograms.mnw.plugins
.#docs-html
(manual, must build).#docs-linkcheck
(optional, please build if adding links)x86_64-linux
aarch64-linux
x86_64-darwin
aarch64-darwin
Add a 👍 reaction to pull requests you find important.