nix-community.nixvim/plugins/by-name/cmp-tabby/default.nix
osbm a41559f093
Some checks are pending
Publish every Git push to main to FlakeHub / flakehub-publish (push) Waiting to run
Publish every git push to Flakestry / publish-flake (push) Waiting to run
Documentation / Version info (push) Waiting to run
Documentation / Build (push) Blocked by required conditions
Documentation / Combine builds (push) Blocked by required conditions
Documentation / Deploy (push) Blocked by required conditions
treewide: add plugin descriptions
2025-06-24 06:10:11 +00:00

51 lines
1.1 KiB
Nix

{ lib, ... }:
let
inherit (lib) types;
inherit (lib.nixvim) defaultNullOpts;
in
lib.nixvim.plugins.mkNeovimPlugin {
name = "cmp-tabby";
description = "[Tabby](https://tabbyml.com) completion source for the nvim-cmp.";
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" ];
};
}