-
-
Notifications
You must be signed in to change notification settings - Fork 158
avante-nvim: reduce mkEnableOption usage and reformat descriptions #1070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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.
Okay, great change overall. I'm not too opposed to mkEnableOption
but we can benefit from more fine-grained control without the merge operators as long as it's consistent with the codebase and documentation.
Left a few comments.
auto_set_highlight_group = mkOption { | ||
type = bool; | ||
default = true; | ||
description = "Automatically set the highlight group for the current line."; | ||
}; |
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 think boolean options should use mkEnableOption because of the "Whether to..." prefix. If replacing (which is fine) please consider "Whether to..." at the beginning so that it's more obvious this is a boolean logical op.
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 am still confused on whether to use mkOption
, and format description to fit into mkEnableOption
standardized strings. Or would merging the "default = true;", as in the original version of the module, be better.
The latter looks ugly, but could be refactored later easily if you ever want to add mkEnableTrue
or similar alias to the mkOption
.
I can revert mkOption
added in this PR back to mkEnableOption
, and provide better fitting descriptions if need be
This PR aims to make formatting of avante.nvim more consistent.
Adding periods to descriptions, fixing missed capitalization, transforming multiline string to one-liners, instead of merging
default = true;
, use mkOption.I don't know if or how I should add it to changelog, because it doesn't affect the end user, but only future maintainers of said module. Per your request and suggestion, I would commit them too.
Sanity Checking
nix fmt
).#nix
(default package).#maximal
.#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.