-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Changes from 3 commits
a1d1eb1
b82772b
33e1632
ae4698c
a8ac4e9
2330091
a7e5414
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,7 @@ | |
| in { | ||
| options.vim.assistant = { | ||
| avante-nvim = { | ||
| enable = mkEnableOption "complementary Neovim plugin for avante.nvim"; | ||
| enable = mkEnableOption "Complementary Neovim plugin for avante.nvim"; | ||
| setupOpts = mkPluginSetupOption "avante-nvim" { | ||
| provider = mkOption { | ||
| type = nullOr str; | ||
|
|
@@ -76,7 +76,7 @@ in { | |
| }; | ||
|
|
||
| dual_boost = { | ||
| enabled = mkEnableOption "dual_boost mode."; | ||
| enabled = mkEnableOption "Dual_boost mode."; | ||
Ladas552 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| first_provider = mkOption { | ||
| type = str; | ||
|
|
@@ -109,39 +109,39 @@ in { | |
|
|
||
| behaviour = { | ||
| auto_suggestions = | ||
| mkEnableOption "auto suggestions."; | ||
| mkEnableOption "Auto suggestions."; | ||
Ladas552 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| auto_set_highlight_group = | ||
| mkEnableOption "automatically set the highlight group for the current line." | ||
| // { | ||
| default = true; | ||
| }; | ||
| auto_set_highlight_group = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Automatically set the highlight group for the current line."; | ||
| }; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am still confused on whether to use The latter looks ugly, but could be refactored later easily if you ever want to add I can revert |
||
|
|
||
| auto_set_keymaps = | ||
| mkEnableOption "automatically set the keymap for the current line." | ||
| // { | ||
| default = true; | ||
| }; | ||
| auto_set_keymaps = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Automatically set the keymap for the current line."; | ||
| }; | ||
|
|
||
| auto_apply_diff_after_generation = | ||
| mkEnableOption "automatically apply diff after LLM response."; | ||
| mkEnableOption "Automatically apply diff after LLM response."; | ||
|
|
||
| support_paste_from_clipboard = mkEnableOption '' | ||
| pasting image from clipboard. | ||
| Pasting image from clipboard. | ||
| This will be determined automatically based whether img-clip is available or not. | ||
| ''; | ||
|
|
||
| minimize_diff = | ||
| mkEnableOption "remove unchanged lines when applying a code block." | ||
| // { | ||
| default = true; | ||
| }; | ||
| minimize_diff = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Remove unchanged lines when applying a code block."; | ||
| }; | ||
|
|
||
| enable_token_counting = | ||
| mkEnableOption "token counting." | ||
| // { | ||
| default = true; | ||
| }; | ||
| enable_token_counting = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Token counting."; | ||
| }; | ||
|
|
||
| enable_cursor_planning_mode = | ||
| mkEnableOption "Cursor Planning Mode."; | ||
|
|
@@ -188,14 +188,11 @@ in { | |
| }; | ||
| }; | ||
|
|
||
| hints.enabled = | ||
| mkEnableOption "" | ||
| // { | ||
| default = true; | ||
| description = '' | ||
| Whether to enable hints. | ||
| ''; | ||
| }; | ||
| hints.enabled = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Whether to enable hints."; | ||
| }; | ||
|
|
||
| windows = { | ||
| position = mkOption { | ||
|
|
@@ -204,14 +201,11 @@ in { | |
| description = "The position of the sidebar."; | ||
| }; | ||
|
|
||
| wrap = | ||
| mkEnableOption "" | ||
| // { | ||
| default = true; | ||
| description = '' | ||
| similar to vim.o.wrap. | ||
| ''; | ||
| }; | ||
| wrap = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Similar to vim.o.wrap."; | ||
| }; | ||
|
|
||
| width = mkOption { | ||
| type = int; | ||
|
|
@@ -223,7 +217,7 @@ in { | |
| enabled = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "enable/disable the header."; | ||
| description = "Enable the sidebar header."; | ||
Ladas552 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }; | ||
|
|
||
| align = mkOption { | ||
|
|
@@ -235,7 +229,7 @@ in { | |
| rounded = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Enable rounded sidebar header"; | ||
| description = "Enable rounded sidebar header."; | ||
| }; | ||
| }; | ||
|
|
||
|
|
@@ -249,9 +243,7 @@ in { | |
| height = mkOption { | ||
| type = int; | ||
| default = 8; | ||
| description = '' | ||
| Height of the input window in vertical layout. | ||
| ''; | ||
| description = "Height of the input window in vertical layout."; | ||
| }; | ||
| }; | ||
|
|
||
|
|
@@ -265,27 +257,21 @@ in { | |
| start_insert = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = '' | ||
| Start insert mode when opening the edit window. | ||
| ''; | ||
| description = "Start insert mode when opening the edit window."; | ||
| }; | ||
| }; | ||
|
|
||
| ask = { | ||
| floating = mkOption { | ||
| type = bool; | ||
| default = false; | ||
| description = '' | ||
| Open the 'AvanteAsk' prompt in a floating window. | ||
| ''; | ||
| description = "Open the 'AvanteAsk' prompt in a floating window."; | ||
| }; | ||
|
|
||
| start_insert = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = '' | ||
| Start insert mode when opening the ask window. | ||
| ''; | ||
| description = "Start insert mode when opening the ask window."; | ||
| }; | ||
|
|
||
| border = mkOption { | ||
|
|
@@ -303,12 +289,11 @@ in { | |
| }; | ||
|
|
||
| diff = { | ||
| autojump = | ||
| mkEnableOption "" | ||
| // { | ||
| default = true; | ||
| description = "Automatically jumps to the next change."; | ||
| }; | ||
| autojump = mkOption { | ||
| type = bool; | ||
| default = true; | ||
| description = "Automatically jumps to the next change."; | ||
| }; | ||
|
|
||
| override_timeoutlen = mkOption { | ||
| type = int; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.