plugins/cmp-tabby: move to by-name

This commit is contained in:
Gaetan Lepage 2024-12-18 18:42:03 +01:00
parent 6e52e32d40
commit 5abe382c54
4 changed files with 51 additions and 75 deletions

View file

@ -0,0 +1,50 @@
{ lib, ... }:
let
inherit (lib) types;
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.neovim-plugin.mkNeovimPlugin {
name = "cmp-tabby";
maintainers = [ lib.maintainers.GaetanLepage ];
imports = [
{ cmpSourcePlugins.cmp_tabby = "cmp-tabby"; }
];
deprecateExtraOptions = true;
optionsRenamedToSettings = [
"host"
"maxLines"
"runOnEveryKeyStroke"
"stop"
];
moduleName = "cmp_tabby.config";
setup = ":setup";
settingsOptions = {
host = defaultNullOpts.mkStr "http://localhost:5000" ''
The address of the tabby host server.
'';
max_lines = defaultNullOpts.mkUnsignedInt 100 ''
The max number of lines to complete.
'';
run_on_every_keystroke = defaultNullOpts.mkBool true ''
Whether to run the completion on every keystroke.
'';
stop = defaultNullOpts.mkListOf types.str [ "\n" ] ''
Stop character.
'';
};
settingsExample = {
host = "http://localhost:5000";
max_lines = 100;
run_on_every_keystroke = true;
stop = [ "\n" ];
};
}