mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-01 16:45:07 +02:00
plugins: Introduce helpers.defaultNullOpts.mkLuaFn (#855)
This allows to avoid calling `mkRaw` on lua functions, as they will get applied automatically. This could also help in the future to refactor the use of Lua code to make it more user-friendly.
This commit is contained in:
parent
b38dbdb0dc
commit
1d8e7906c9
30 changed files with 140 additions and 119 deletions
|
@ -69,7 +69,7 @@ in {
|
|||
'';
|
||||
|
||||
condition =
|
||||
helpers.defaultNullOpts.mkStr
|
||||
helpers.defaultNullOpts.mkLuaFn
|
||||
''
|
||||
function(buf)
|
||||
local fn = vim.fn
|
||||
|
@ -120,7 +120,7 @@ in {
|
|||
cleaning_interval = cleaningInterval;
|
||||
};
|
||||
trigger_events = cfg.triggerEvents;
|
||||
condition = helpers.mkRaw cfg.condition;
|
||||
inherit (cfg) condition;
|
||||
write_all_buffers = cfg.writeAllBuffers;
|
||||
debounce_delay = cfg.debounceDelay;
|
||||
callbacks = with cfg.callbacks;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue