plugins/cmp: remove helpers

This commit is contained in:
Austin Horstman 2024-10-06 10:05:31 -05:00
parent 62b87e5b56
commit 08cac4a5c0
No known key found for this signature in database
12 changed files with 113 additions and 112 deletions

View file

@ -1,6 +1,7 @@
{ lib, helpers }:
{ lib }:
let
inherit (lib) types;
inherit (lib.nixvim) mkNullOrOption;
sourceType = types.submodule {
freeformType = with types; attrsOf anything;
@ -11,29 +12,29 @@ let
example = "buffer";
};
option = helpers.mkNullOrOption (with types; attrsOf anything) ''
option = mkNullOrOption (with types; attrsOf anything) ''
Any specific options defined by the source itself.
If direct lua code is needed use `helpers.mkRaw`.
If direct lua code is needed use `lib.nixvim.mkRaw`.
'';
keyword_length = helpers.mkNullOrOption types.ints.unsigned ''
keyword_length = mkNullOrOption types.ints.unsigned ''
The source-specific keyword length to trigger auto completion.
'';
keyword_pattern = helpers.mkNullOrLua ''
keyword_pattern = lib.nixvim.mkNullOrLua ''
The source-specific keyword pattern.
'';
trigger_characters = helpers.mkNullOrOption (with types; listOf str) ''
trigger_characters = mkNullOrOption (with types; listOf str) ''
Trigger characters.
'';
priority = helpers.mkNullOrOption types.ints.unsigned ''
priority = mkNullOrOption types.ints.unsigned ''
The source-specific priority value.
'';
group_index = helpers.mkNullOrOption types.ints.unsigned ''
group_index = mkNullOrOption types.ints.unsigned ''
The source group index.
For instance, you can set the `buffer`'s source `group_index` to a larger number
@ -53,7 +54,7 @@ let
```
'';
entry_filter = helpers.mkNullOrLuaFn ''
entry_filter = lib.nixvim.mkNullOrLuaFn ''
A source-specific entry filter, with the following function signature:
`function(entry: cmp.Entry, ctx: cmp.Context): boolean`