mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-24 04:35:08 +02:00
plugins/cmp: remove helpers
This commit is contained in:
parent
62b87e5b56
commit
08cac4a5c0
12 changed files with 113 additions and 112 deletions
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkRenamedOptionModule types;
|
||||
inherit (lib.nixvim) defaultNullOpts;
|
||||
|
||||
cfg = config.plugins.cmp-tabby;
|
||||
in
|
||||
{
|
||||
|
@ -31,23 +32,23 @@ in
|
|||
];
|
||||
|
||||
options.plugins.cmp-tabby = {
|
||||
settings = helpers.mkSettingsOption {
|
||||
settings = lib.nixvim.mkSettingsOption {
|
||||
description = "Options provided to the `require('cmp_ai.config'):setup` function.";
|
||||
|
||||
options = {
|
||||
host = helpers.defaultNullOpts.mkStr "http://localhost:5000" ''
|
||||
host = defaultNullOpts.mkStr "http://localhost:5000" ''
|
||||
The address of the tabby host server.
|
||||
'';
|
||||
|
||||
max_lines = helpers.defaultNullOpts.mkUnsignedInt 100 ''
|
||||
max_lines = defaultNullOpts.mkUnsignedInt 100 ''
|
||||
The max number of lines to complete.
|
||||
'';
|
||||
|
||||
run_on_every_keystroke = helpers.defaultNullOpts.mkBool true ''
|
||||
run_on_every_keystroke = defaultNullOpts.mkBool true ''
|
||||
Whether to run the completion on every keystroke.
|
||||
'';
|
||||
|
||||
stop = helpers.defaultNullOpts.mkListOf types.str [ "\n" ] ''
|
||||
stop = defaultNullOpts.mkListOf types.str [ "\n" ] ''
|
||||
Stop character.
|
||||
'';
|
||||
};
|
||||
|
@ -63,7 +64,7 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
extraConfigLua = ''
|
||||
require('cmp_tabby.config'):setup(${helpers.toLuaObject cfg.settings})
|
||||
require('cmp_tabby.config'):setup(${lib.nixvim.toLuaObject cfg.settings})
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue