-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
plugins/copilot-lua: migrate to mkNeovimPlugin #2742
base: main
Are you sure you want to change the base?
plugins/copilot-lua: migrate to mkNeovimPlugin #2742
Conversation
259664b
to
95d347d
Compare
95d347d
to
4daa8dd
Compare
jumpPrev = keymapOption "[[" "Keymap for jumping to the previous suggestion."; | ||
|
||
jumpNext = keymapOption "]]" "Keymap for jumping to the next suggestion."; | ||
keymapOption = defaultNullOpts.mkNullableWithRaw (with types; either (enum [ false ]) str); |
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.
keymapOption = defaultNullOpts.mkNullableWithRaw (with types; either (enum [ false ]) str); | |
mkKeymapOption = defaultNullOpts.mkNullableWithRaw (with types; either (enum [ false ]) str); |
It makes it clearer that it is a function.
name = "copilot-lua"; | ||
moduleName = "copilot"; | ||
packPathName = "copilot.lua"; | ||
package = "copilot-lua"; |
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.
package = "copilot-lua"; |
package
defaults to name
.
keymap = { | ||
accept = keymapOption "<M-l>" "Keymap for accepting the suggestion."; | ||
filetypes = | ||
defaultNullOpts.mkAttrsOf types.bool |
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.
Can you take this opportunity to switch to mkAttrsOf'
and provide the example
key ?
copilot_node_command = lib.mkOption { | ||
type = types.str; | ||
default = lib.getExe pkgs.nodejs-18_x; | ||
example = lib.getExe pkgs.nodejs; |
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.
example = lib.getExe pkgs.nodejs; | |
example = lib.literalExpression "lib.getExe pkgs.nodejs"; |
I guess.
}; | ||
}; | ||
}; | ||
settingsExample = { |
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.
Please, keep this example shorter as it is the one that will be used in the documentation.
Target 5-10 options only.
The example
test case in the test file can be as big as you want though.
No description provided.