mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
lib: remove helpers
from internal usage
This commit is contained in:
parent
2c4e4681db
commit
cd76b4feb8
7 changed files with 38 additions and 39 deletions
|
@ -1,6 +1,7 @@
|
|||
{ lib, helpers }:
|
||||
{ lib }:
|
||||
let
|
||||
inherit (lib) types;
|
||||
inherit (lib.nixvim) defaultNullOpts;
|
||||
in
|
||||
rec {
|
||||
autoGroupOption = types.submodule {
|
||||
|
@ -14,34 +15,34 @@ rec {
|
|||
};
|
||||
|
||||
autoCmdOptions = {
|
||||
event = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
||||
event = lib.nixvim.mkNullOrOption (with types; either str (listOf str)) ''
|
||||
The event or events to register this autocommand.
|
||||
'';
|
||||
|
||||
group = helpers.mkNullOrOption (with types; either str int) ''
|
||||
group = lib.nixvim.mkNullOrOption (with types; either str int) ''
|
||||
The autocommand group name or id to match against.
|
||||
'';
|
||||
|
||||
pattern = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
||||
pattern = lib.nixvim.mkNullOrOption (with types; either str (listOf str)) ''
|
||||
Pattern or patterns to match literally against.
|
||||
'';
|
||||
|
||||
buffer = helpers.mkNullOrOption types.int ''
|
||||
buffer = lib.nixvim.mkNullOrOption types.int ''
|
||||
Buffer number for buffer local autocommands |autocmd-buflocal|.
|
||||
Cannot be used with `pattern`.
|
||||
'';
|
||||
|
||||
# Introduced early October 2023.
|
||||
# TODO remove in early December 2023.
|
||||
description = helpers.mkNullOrOption types.str ''
|
||||
description = lib.nixvim.mkNullOrOption types.str ''
|
||||
DEPRECATED, please use `desc`.
|
||||
'';
|
||||
|
||||
desc = helpers.mkNullOrOption types.str ''
|
||||
desc = lib.nixvim.mkNullOrOption types.str ''
|
||||
A textual description of this autocommand.
|
||||
'';
|
||||
|
||||
callback = helpers.mkNullOrOption (with types; either str rawLua) ''
|
||||
callback = lib.nixvim.mkNullOrOption (with types; either str rawLua) ''
|
||||
A function or a string.
|
||||
- if a string, the name of a Vimscript function to call when this autocommand is triggered.
|
||||
- Otherwise, a Lua function which is called when this autocommand is triggered.
|
||||
|
@ -65,13 +66,13 @@ rec {
|
|||
}
|
||||
'';
|
||||
|
||||
command = helpers.defaultNullOpts.mkStr "" ''
|
||||
command = defaultNullOpts.mkStr "" ''
|
||||
Vim command to execute on event. Cannot be used with `callback`.
|
||||
'';
|
||||
|
||||
once = helpers.defaultNullOpts.mkBool false "Run the autocommand only once.";
|
||||
once = defaultNullOpts.mkBool false "Run the autocommand only once.";
|
||||
|
||||
nested = helpers.defaultNullOpts.mkBool false "Run nested autocommands.";
|
||||
nested = defaultNullOpts.mkBool false "Run nested autocommands.";
|
||||
};
|
||||
|
||||
autoCmdOption = types.submodule { options = autoCmdOptions; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue