mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-02 09:04:54 +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
|
@ -78,11 +78,11 @@ in {
|
|||
Induces slow-down w/ plenary finder (true if `fd` available).
|
||||
'';
|
||||
|
||||
browseFiles = helpers.defaultNullOpts.mkStr "fb_finders.browse_files" ''
|
||||
browseFiles = helpers.defaultNullOpts.mkLuaFn "fb_finders.browse_files" ''
|
||||
A custom lua function to override for the file browser.
|
||||
'';
|
||||
|
||||
browseFolders = helpers.defaultNullOpts.mkStr "fb_finders.browse_folders" ''
|
||||
browseFolders = helpers.defaultNullOpts.mkLuaFn "fb_finders.browse_folders" ''
|
||||
A custom lua function to override for the folder browser.
|
||||
'';
|
||||
|
||||
|
@ -151,8 +151,8 @@ in {
|
|||
;
|
||||
add_dirs = addDirs;
|
||||
auto_depth = autoDepth;
|
||||
browse_files = helpers.mkRaw browseFiles;
|
||||
browse_folders = helpers.mkRaw browseFolders;
|
||||
browse_files = browseFiles;
|
||||
browse_folders = browseFolders;
|
||||
collapse_dirs = collapseDirs;
|
||||
cwd_to_path = cwdToPath;
|
||||
dir_icon = dirIcon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue