mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-02 21:34:33 +02:00
plugins/utils: normalize plugin defaults
This commit is contained in:
parent
b10a391bd0
commit
6ab2a39e6a
53 changed files with 1434 additions and 1221 deletions
|
@ -31,16 +31,14 @@ in
|
|||
|
||||
executionMessage = {
|
||||
message =
|
||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
||||
''
|
||||
{
|
||||
__raw = \'\'
|
||||
function()
|
||||
return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
end
|
||||
\'\';
|
||||
}
|
||||
''
|
||||
helpers.defaultNullOpts.mkStr
|
||||
{
|
||||
__raw = ''
|
||||
function()
|
||||
return ("AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"))
|
||||
end
|
||||
'';
|
||||
}
|
||||
''
|
||||
The message to print en save.
|
||||
This can be a lua function that returns a string.
|
||||
|
@ -48,7 +46,7 @@ in
|
|||
|
||||
dim = helpers.defaultNullOpts.mkNullable (types.numbers.between 0
|
||||
1
|
||||
) "0.18" "Dim the color of `message`.";
|
||||
) 0.18 "Dim the color of `message`.";
|
||||
|
||||
cleaningInterval = helpers.defaultNullOpts.mkInt 1250 ''
|
||||
Time (in milliseconds) to wait before automatically cleaning MsgArea after displaying
|
||||
|
@ -58,7 +56,11 @@ in
|
|||
};
|
||||
|
||||
triggerEvents =
|
||||
helpers.defaultNullOpts.mkNullable (with types; listOf str) ''["InsertLeave" "TextChanged"]''
|
||||
helpers.defaultNullOpts.mkListOf types.str
|
||||
[
|
||||
"InsertLeave"
|
||||
"TextChanged"
|
||||
]
|
||||
''
|
||||
Vim events that trigger auto-save.
|
||||
See `:h events`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue