plugins/telescope: migrate helpers -> lib.nixvim

This commit is contained in:
Austin Horstman 2024-08-22 00:00:55 -05:00
parent d7b506efdd
commit 83c2844bec
No known key found for this signature in database
9 changed files with 390 additions and 441 deletions

View file

@ -1,13 +1,15 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
with lib; with lib;
let
inherit (lib.nixvim) keymaps mkNullOrOption toLuaObject;
in
# TODO:add support for additional filetypes. This requires autocommands! # TODO:add support for additional filetypes. This requires autocommands!
helpers.neovim-plugin.mkNeovimPlugin config { lib.nixvim.neovim-plugin.mkNeovimPlugin config {
name = "telescope"; name = "telescope";
originalName = "telescope.nvim"; originalName = "telescope.nvim";
defaultPackage = pkgs.vimPlugins.telescope-nvim; defaultPackage = pkgs.vimPlugins.telescope-nvim;
@ -45,8 +47,8 @@ helpers.neovim-plugin.mkNeovimPlugin config {
type = types.str; type = types.str;
description = "The telescope action to run."; description = "The telescope action to run.";
}; };
mode = helpers.keymaps.mkModeOption "n"; mode = keymaps.mkModeOption "n";
options = helpers.keymaps.mapConfigOptions; options = keymaps.mapConfigOptions;
}; };
}) })
); );
@ -105,9 +107,9 @@ helpers.neovim-plugin.mkNeovimPlugin config {
) cfg.keymaps; ) cfg.keymaps;
extraConfigLua = '' extraConfigLua = ''
require('telescope').setup(${helpers.toLuaObject cfg.settings}) require('telescope').setup(${toLuaObject cfg.settings})
local __telescopeExtensions = ${helpers.toLuaObject cfg.enabledExtensions} local __telescopeExtensions = ${toLuaObject cfg.enabledExtensions}
for i, extension in ipairs(__telescopeExtensions) do for i, extension in ipairs(__telescopeExtensions) do
require('telescope').load_extension(extension) require('telescope').load_extension(extension)
end end
@ -118,11 +120,11 @@ helpers.neovim-plugin.mkNeovimPlugin config {
}; };
settingsOptions = { settingsOptions = {
defaults = helpers.mkNullOrOption (with types; attrsOf anything) '' defaults = mkNullOrOption (with types; attrsOf anything) ''
Default configuration for telescope. Default configuration for telescope.
''; '';
pickers = helpers.mkNullOrOption (with types; attrsOf anything) '' pickers = mkNullOrOption (with types; attrsOf anything) ''
Default configuration for builtin pickers. Default configuration for builtin pickers.
''; '';

View file

@ -1,10 +1,8 @@
{ { lib, config, ... }:
lib,
config,
helpers,
...
}:
with lib; with lib;
let
inherit (lib.nixvim) mkPluginPackageOption mkSettingsOption toSnakeCase;
in
rec { rec {
mkExtension = mkExtension =
{ {
@ -36,7 +34,7 @@ rec {
let let
optionPath = if isString option then [ option ] else option; # option is already a path (i.e. a list) optionPath = if isString option then [ option ] else option; # option is already a path (i.e. a list)
optionPathSnakeCase = map helpers.toSnakeCase optionPath; optionPathSnakeCase = map toSnakeCase optionPath;
in in
mkRenamedOptionModule (basePluginPath ++ optionPath) (settingsPath ++ optionPathSnakeCase) mkRenamedOptionModule (basePluginPath ++ optionPath) (settingsPath ++ optionPathSnakeCase)
) optionsRenamedToSettings); ) optionsRenamedToSettings);
@ -44,9 +42,9 @@ rec {
options.plugins.telescope.extensions.${name} = { options.plugins.telescope.extensions.${name} = {
enable = mkEnableOption "the `${name}` telescope extension"; enable = mkEnableOption "the `${name}` telescope extension";
package = helpers.mkPluginPackageOption name defaultPackage; package = mkPluginPackageOption name defaultPackage;
settings = helpers.mkSettingsOption { settings = mkSettingsOption {
description = "settings for the `${name}` telescope extension."; description = "settings for the `${name}` telescope extension.";
options = settingsOptions; options = settingsOptions;
example = settingsExample; example = settingsExample;
@ -73,7 +71,7 @@ rec {
mkModeMappingsOption = mkModeMappingsOption =
mode: defaults: mode: defaults:
mkOption { mkOption {
type = with helpers.nixvimTypes; attrsOf strLuaFn; type = with types; attrsOf strLuaFn;
default = { }; default = { };
description = '' description = ''
Keymaps in ${mode} mode. Keymaps in ${mode} mode.
@ -83,7 +81,7 @@ rec {
${defaults} ${defaults}
``` ```
''; '';
apply = mapAttrs (_: helpers.mkRaw); apply = mapAttrs (_: mkRaw);
}; };
mkMappingsOption = mkMappingsOption =

View file

@ -1,20 +1,13 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
with lib; with lib;
let let
telescopeHelpers = import ./_helpers.nix { telescopeHelpers = import ./_helpers.nix { inherit lib config pkgs; };
inherit inherit (lib.nixvim) defaultNullOpts mkNullOrStr;
lib
helpers
config
pkgs
;
};
in in
telescopeHelpers.mkExtension { telescopeHelpers.mkExtension {
name = "file-browser"; name = "file-browser";
@ -79,58 +72,58 @@ telescopeHelpers.mkExtension {
]; ];
settingsOptions = { settingsOptions = {
theme = helpers.mkNullOrStr '' theme = mkNullOrStr ''
Custom theme, will use your global theme by default. Custom theme, will use your global theme by default.
''; '';
path = helpers.defaultNullOpts.mkStr { __raw = "vim.loop.cwd()"; } '' path = defaultNullOpts.mkStr { __raw = "vim.loop.cwd()"; } ''
Directory to browse files from. Directory to browse files from.
`vim.fn.expanded` automatically. `vim.fn.expanded` automatically.
''; '';
cwd = helpers.defaultNullOpts.mkStr { __raw = "vim.loop.cwd()"; } '' cwd = defaultNullOpts.mkStr { __raw = "vim.loop.cwd()"; } ''
Directory to browse folders from. Directory to browse folders from.
`vim.fn.expanded` automatically. `vim.fn.expanded` automatically.
''; '';
cwd_to_path = helpers.defaultNullOpts.mkBool false '' cwd_to_path = defaultNullOpts.mkBool false ''
Whether folder browser is launched from `path` rather than `cwd`. Whether folder browser is launched from `path` rather than `cwd`.
''; '';
grouped = helpers.defaultNullOpts.mkBool false '' grouped = defaultNullOpts.mkBool false ''
Group initial sorting by directories and then files. Group initial sorting by directories and then files.
''; '';
files = helpers.defaultNullOpts.mkBool true '' files = defaultNullOpts.mkBool true ''
Start in file (true) or folder (false) browser. Start in file (true) or folder (false) browser.
''; '';
add_dirs = helpers.defaultNullOpts.mkBool true '' add_dirs = defaultNullOpts.mkBool true ''
Whether the file browser shows folders. Whether the file browser shows folders.
''; '';
depth = helpers.defaultNullOpts.mkUnsignedInt 1 '' depth = defaultNullOpts.mkUnsignedInt 1 ''
File tree depth to display, `false` for unlimited depth. File tree depth to display, `false` for unlimited depth.
''; '';
auto_depth = helpers.defaultNullOpts.mkBool false '' auto_depth = defaultNullOpts.mkBool false ''
Unlimit or set `depth` to `auto_depth` & unset grouped on prompt for file_browser. Unlimit or set `depth` to `auto_depth` & unset grouped on prompt for file_browser.
''; '';
select_buffer = helpers.defaultNullOpts.mkBool false '' select_buffer = defaultNullOpts.mkBool false ''
Select current buffer if possible. Select current buffer if possible.
May imply `hidden=true`. May imply `hidden=true`.
''; '';
hidden = hidden =
helpers.defaultNullOpts.mkNullable defaultNullOpts.mkNullable
( (
with types; with types;
either bool (submodule { either bool (submodule {
options = { options = {
file_browser = helpers.defaultNullOpts.mkBool false ""; file_browser = defaultNullOpts.mkBool false "";
folder_browser = helpers.defaultNullOpts.mkBool false ""; folder_browser = defaultNullOpts.mkBool false "";
}; };
}) })
) )
@ -140,53 +133,53 @@ telescopeHelpers.mkExtension {
} }
"Determines whether to show hidden files or not."; "Determines whether to show hidden files or not.";
respect_gitignore = helpers.defaultNullOpts.mkBool false '' respect_gitignore = defaultNullOpts.mkBool false ''
Induces slow-down w/ plenary finder (true if `fd` available). Induces slow-down w/ plenary finder (true if `fd` available).
''; '';
browse_files = helpers.defaultNullOpts.mkLuaFn "require('telescope._extensions.file_browser.finders').browse_files" "A custom lua function to override for the file browser."; browse_files = defaultNullOpts.mkLuaFn "require('telescope._extensions.file_browser.finders').browse_files" "A custom lua function to override for the file browser.";
browse_folders = helpers.defaultNullOpts.mkLuaFn "require('telescope._extensions.file_browser.finders').browse_folders" "A custom lua function to override for the folder browser."; browse_folders = defaultNullOpts.mkLuaFn "require('telescope._extensions.file_browser.finders').browse_folders" "A custom lua function to override for the folder browser.";
hide_parent_dir = helpers.defaultNullOpts.mkBool false '' hide_parent_dir = defaultNullOpts.mkBool false ''
Hide `../` in the file browser. Hide `../` in the file browser.
''; '';
collapse_dirs = helpers.defaultNullOpts.mkBool false '' collapse_dirs = defaultNullOpts.mkBool false ''
Skip with only a single (possibly hidden) sub-dir in file_browser. Skip with only a single (possibly hidden) sub-dir in file_browser.
''; '';
quiet = helpers.defaultNullOpts.mkBool false '' quiet = defaultNullOpts.mkBool false ''
Suppress any notification from file_browser actions. Suppress any notification from file_browser actions.
''; '';
dir_icon = helpers.defaultNullOpts.mkStr "" '' dir_icon = defaultNullOpts.mkStr "" ''
Change the icon for a directory. Change the icon for a directory.
''; '';
dir_icon_hl = helpers.defaultNullOpts.mkStr "Default" '' dir_icon_hl = defaultNullOpts.mkStr "Default" ''
Change the highlight group of dir icon. Change the highlight group of dir icon.
''; '';
display_stat = helpers.defaultNullOpts.mkAttrsOf types.anything { display_stat = defaultNullOpts.mkAttrsOf types.anything {
date = true; date = true;
size = true; size = true;
mode = true; mode = true;
} "Ordered stat; see upstream for more info."; } "Ordered stat; see upstream for more info.";
hijack_netrw = helpers.defaultNullOpts.mkBool false '' hijack_netrw = defaultNullOpts.mkBool false ''
Use telescope file browser when opening directory paths. Use telescope file browser when opening directory paths.
''; '';
use_fd = helpers.defaultNullOpts.mkBool true '' use_fd = defaultNullOpts.mkBool true ''
Use `fd` if available over `plenary.scandir`. Use `fd` if available over `plenary.scandir`.
''; '';
git_status = helpers.defaultNullOpts.mkBool true '' git_status = defaultNullOpts.mkBool true ''
Show the git status of files (true if `git` is found). Show the git status of files (true if `git` is found).
''; '';
prompt_path = helpers.defaultNullOpts.mkBool false '' prompt_path = defaultNullOpts.mkBool false ''
Show the current relative path from cwd as the prompt prefix. Show the current relative path from cwd as the prompt prefix.
''; '';

View file

@ -1,20 +1,14 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
with lib; with lib;
(import ./_helpers.nix { let
inherit inherit (lib.nixvim) defaultNullOpts mkNullOrOption mkNullOrStr;
lib in
helpers (import ./_helpers.nix { inherit lib config pkgs; }).mkExtension {
config
pkgs
;
}).mkExtension
{
name = "frecency"; name = "frecency";
defaultPackage = pkgs.vimPlugins.telescope-frecency-nvim; defaultPackage = pkgs.vimPlugins.telescope-frecency-nvim;
@ -45,43 +39,43 @@ with lib;
]; ];
settingsOptions = { settingsOptions = {
auto_validate = helpers.defaultNullOpts.mkBool true '' auto_validate = defaultNullOpts.mkBool true ''
If true, it removes stale entries count over than `db_validate_threshold`. If true, it removes stale entries count over than `db_validate_threshold`.
''; '';
db_root = helpers.defaultNullOpts.mkStr { __raw = "vim.fn.stdpath 'data'"; } '' db_root = defaultNullOpts.mkStr { __raw = "vim.fn.stdpath 'data'"; } ''
Path to parent directory of custom database location. Path to parent directory of custom database location.
Defaults to `$XDG_DATA_HOME/nvim` if unset. Defaults to `$XDG_DATA_HOME/nvim` if unset.
''; '';
db_safe_mode = helpers.defaultNullOpts.mkBool true '' db_safe_mode = defaultNullOpts.mkBool true ''
If true, it shows confirmation dialog by `vim.ui.select()` before validating DB. If true, it shows confirmation dialog by `vim.ui.select()` before validating DB.
''; '';
db_validate_threshold = helpers.defaultNullOpts.mkUnsignedInt 10 '' db_validate_threshold = defaultNullOpts.mkUnsignedInt 10 ''
It will removes over than this count in validating DB. It will removes over than this count in validating DB.
''; '';
default_workspace = helpers.mkNullOrStr '' default_workspace = mkNullOrStr ''
Default workspace tag to filter by e.g. `'CWD'` to filter by default to the current Default workspace tag to filter by e.g. `'CWD'` to filter by default to the current
directory. directory.
Can be overridden at query time by specifying another filter like `':*:'`. Can be overridden at query time by specifying another filter like `':*:'`.
''; '';
disable_devicons = helpers.defaultNullOpts.mkBool false '' disable_devicons = defaultNullOpts.mkBool false ''
Disable devicons (if available). Disable devicons (if available).
''; '';
hide_current_buffer = helpers.defaultNullOpts.mkBool false '' hide_current_buffer = defaultNullOpts.mkBool false ''
If true, it does not show the current buffer in candidates. If true, it does not show the current buffer in candidates.
''; '';
filter_delimiter = helpers.defaultNullOpts.mkStr ":" '' filter_delimiter = defaultNullOpts.mkStr ":" ''
Delimiters to indicate the filter like `:CWD:`. Delimiters to indicate the filter like `:CWD:`.
''; '';
ignore_patterns = ignore_patterns =
helpers.defaultNullOpts.mkListOf types.str defaultNullOpts.mkListOf types.str
[ [
"*.git/*" "*.git/*"
"*/tmp/*" "*/tmp/*"
@ -92,7 +86,7 @@ with lib;
in the finder results). in the finder results).
''; '';
max_timestamps = helpers.defaultNullOpts.mkPositiveInt 10 '' max_timestamps = defaultNullOpts.mkPositiveInt 10 ''
Set the max count of timestamps DB keeps when you open files. Set the max count of timestamps DB keeps when you open files.
It ignores the value and use `10` if you set less than or equal to `0`. It ignores the value and use `10` if you set less than or equal to `0`.
@ -101,25 +95,21 @@ with lib;
It is reasonable to set this value more than or equal to the default value: `10`. It is reasonable to set this value more than or equal to the default value: `10`.
''; '';
show_filter_column = show_filter_column = defaultNullOpts.mkNullable (with types; either bool (listOf str)) true ''
helpers.defaultNullOpts.mkNullable (with types; either bool (listOf str)) true
''
Show the path of the active filter before file paths. Show the path of the active filter before file paths.
In default, it uses the tail of paths for `'LSP'` and `'CWD'` tags. In default, it uses the tail of paths for `'LSP'` and `'CWD'` tags.
You can configure this by setting a table for this option. You can configure this by setting a table for this option.
''; '';
show_scores = helpers.defaultNullOpts.mkBool false '' show_scores = defaultNullOpts.mkBool false ''
To see the scores generated by the algorithm in the results, set this to true. To see the scores generated by the algorithm in the results, set this to true.
''; '';
show_unindexed = helpers.defaultNullOpts.mkBool true '' show_unindexed = defaultNullOpts.mkBool true ''
Determines if non-indexed files are included in workspace filter results. Determines if non-indexed files are included in workspace filter results.
''; '';
workspace_scan_cmd = workspace_scan_cmd = mkNullOrOption (with types; either rawLua (listOf str)) ''
helpers.mkNullOrOption (with helpers.nixvimTypes; either rawLua (listOf str))
''
This option can be set values as `"LUA"|string[]|null`. This option can be set values as `"LUA"|string[]|null`.
With the default value: `null`, it uses these way below to make entries for workspace With the default value: `null`, it uses these way below to make entries for workspace
files. files.
@ -138,7 +128,7 @@ with lib;
If you prefer Native Lua code, set `workspace_scan_cmd.__raw = "LUA"`. If you prefer Native Lua code, set `workspace_scan_cmd.__raw = "LUA"`.
''; '';
workspaces = helpers.defaultNullOpts.mkAttrsOf types.str { } '' workspaces = defaultNullOpts.mkAttrsOf types.str { } ''
This attrs contains mappings of `workspace_tag` -> `workspace_directory`. This attrs contains mappings of `workspace_tag` -> `workspace_directory`.
The key corresponds to the `:tag_name` used to select the filter in queries. The key corresponds to the `:tag_name` used to select the filter in queries.
The value corresponds to the top level directory by which results will be filtered. The value corresponds to the top level directory by which results will be filtered.
@ -161,4 +151,4 @@ with lib;
wiki = "/home/my_username/wiki"; wiki = "/home/my_username/wiki";
}; };
}; };
} }

View file

@ -1,19 +1,13 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
(import ./_helpers.nix { let
inherit inherit (lib.nixvim) defaultNullOpts;
lib in
helpers (import ./_helpers.nix { inherit lib config pkgs; }).mkExtension {
config
pkgs
;
}).mkExtension
{
name = "fzf-native"; name = "fzf-native";
extensionName = "fzf"; extensionName = "fzf";
defaultPackage = pkgs.vimPlugins.telescope-fzf-native-nvim; defaultPackage = pkgs.vimPlugins.telescope-fzf-native-nvim;
@ -27,19 +21,19 @@
]; ];
settingsOptions = { settingsOptions = {
fuzzy = helpers.defaultNullOpts.mkBool true '' fuzzy = defaultNullOpts.mkBool true ''
Whether to fuzzy search. False will do exact matching. Whether to fuzzy search. False will do exact matching.
''; '';
override_generic_sorter = helpers.defaultNullOpts.mkBool true '' override_generic_sorter = defaultNullOpts.mkBool true ''
Override the generic sorter. Override the generic sorter.
''; '';
override_file_sorter = helpers.defaultNullOpts.mkBool true '' override_file_sorter = defaultNullOpts.mkBool true ''
Override the file sorter. Override the file sorter.
''; '';
case_mode = helpers.defaultNullOpts.mkEnumFirstDefault [ case_mode = defaultNullOpts.mkEnumFirstDefault [
"smart_case" "smart_case"
"ignore_case" "ignore_case"
"respect_case" "respect_case"
@ -57,4 +51,4 @@
# Native library is in build/libfzf.so # Native library is in build/libfzf.so
performance.combinePlugins.pathsToLink = [ "/build" ]; performance.combinePlugins.pathsToLink = [ "/build" ];
}; };
} }

View file

@ -1,19 +1,13 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
(import ./_helpers.nix { let
inherit inherit (lib.nixvim) defaultNullOpts;
lib in
helpers (import ./_helpers.nix { inherit lib config pkgs; }).mkExtension {
config
pkgs
;
}).mkExtension
{
name = "fzy-native"; name = "fzy-native";
extensionName = "fzy_native"; extensionName = "fzy_native";
defaultPackage = pkgs.vimPlugins.telescope-fzy-native-nvim; defaultPackage = pkgs.vimPlugins.telescope-fzy-native-nvim;
@ -25,11 +19,11 @@
]; ];
settingsOptions = { settingsOptions = {
override_file_sorter = helpers.defaultNullOpts.mkBool true '' override_file_sorter = defaultNullOpts.mkBool true ''
Whether to override the file sorter. Whether to override the file sorter.
''; '';
override_generic_sorter = helpers.defaultNullOpts.mkBool true '' override_generic_sorter = defaultNullOpts.mkBool true ''
Whether to override the generic sorter. Whether to override the generic sorter.
''; '';
}; };
@ -43,4 +37,4 @@
# fzy-native itself is in deps directory # fzy-native itself is in deps directory
performance.combinePlugins.pathsToLink = [ "/deps/fzy-lua-native" ]; performance.combinePlugins.pathsToLink = [ "/deps/fzy-lua-native" ];
}; };
} }

View file

@ -1,20 +1,14 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
with lib; with lib;
(import ./_helpers.nix { let
inherit inherit (lib.nixvim) defaultNullOpts;
lib in
helpers (import ./_helpers.nix { inherit lib config pkgs; }).mkExtension {
config
pkgs
;
}).mkExtension
{
name = "media-files"; name = "media-files";
extensionName = "media_files"; extensionName = "media_files";
defaultPackage = pkgs.vimPlugins.telescope-media-files-nvim; defaultPackage = pkgs.vimPlugins.telescope-media-files-nvim;
@ -122,7 +116,7 @@ with lib;
}; };
settingsOptions = { settingsOptions = {
filetypes = helpers.defaultNullOpts.mkListOf types.str [ filetypes = defaultNullOpts.mkListOf types.str [
"png" "png"
"jpg" "jpg"
"gif" "gif"
@ -131,7 +125,7 @@ with lib;
"pdf" "pdf"
] "Filetypes whitelist."; ] "Filetypes whitelist.";
find_cmd = helpers.defaultNullOpts.mkStr "fd" '' find_cmd = defaultNullOpts.mkStr "fd" ''
Which find command to use. Which find command to use.
''; '';
}; };
@ -145,4 +139,4 @@ with lib;
]; ];
find_cmd = "rg"; find_cmd = "rg";
}; };
} }

View file

@ -1,23 +1,14 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
(import ./_helpers.nix { (import ./_helpers.nix { inherit lib config pkgs; }).mkExtension {
inherit
lib
helpers
config
pkgs
;
}).mkExtension
{
name = "ui-select"; name = "ui-select";
defaultPackage = pkgs.vimPlugins.telescope-ui-select-nvim; defaultPackage = pkgs.vimPlugins.telescope-ui-select-nvim;
settingsExample = { settingsExample = {
specific_opts.codeactions = false; specific_opts.codeactions = false;
}; };
} }

View file

@ -1,20 +1,13 @@
{ {
lib, lib,
helpers,
config, config,
pkgs, pkgs,
... ...
}: }:
with lib; with lib;
let let
telescopeHelpers = import ./_helpers.nix { inherit (lib.nixvim) defaultNullOpts mkNullOrOption;
inherit telescopeHelpers = import ./_helpers.nix { inherit lib config pkgs; };
lib
helpers
config
pkgs
;
};
in in
telescopeHelpers.mkExtension { telescopeHelpers.mkExtension {
name = "undo"; name = "undo";
@ -60,34 +53,34 @@ telescopeHelpers.mkExtension {
]; ];
settingsOptions = { settingsOptions = {
use_delta = helpers.defaultNullOpts.mkBool true '' use_delta = defaultNullOpts.mkBool true ''
When set to true, [delta](https://github.com/dandavison/delta) is used for fancy diffs in When set to true, [delta](https://github.com/dandavison/delta) is used for fancy diffs in
the preview section. the preview section.
If set to false, `telescope-undo` will not use `delta` even when available and fall back to a If set to false, `telescope-undo` will not use `delta` even when available and fall back to a
plain diff with treesitter highlights. plain diff with treesitter highlights.
''; '';
use_custom_command = helpers.mkNullOrOption (with types; listOf str) '' use_custom_command = mkNullOrOption (with types; listOf str) ''
Should be in this format: `[ "bash" "-c" "echo '$DIFF' | delta" ]` Should be in this format: `[ "bash" "-c" "echo '$DIFF' | delta" ]`
''; '';
side_by_side = helpers.defaultNullOpts.mkBool false '' side_by_side = defaultNullOpts.mkBool false ''
If set to true tells `delta` to render diffs side-by-side. Thus, requires `delta` to be used. If set to true tells `delta` to render diffs side-by-side. Thus, requires `delta` to be used.
Be aware that `delta` always uses its own configuration, so it might be that you're getting Be aware that `delta` always uses its own configuration, so it might be that you're getting
the side-by-side view even if this is set to false. the side-by-side view even if this is set to false.
''; '';
vim_diff_opts = { vim_diff_opts = {
ctxlen = helpers.defaultNullOpts.mkStrLuaOr types.ints.unsigned "vim.o.scrolloff" '' ctxlen = defaultNullOpts.mkStrLuaOr types.ints.unsigned "vim.o.scrolloff" ''
Defaults to the scrolloff. Defaults to the scrolloff.
''; '';
}; };
entry_format = helpers.defaultNullOpts.mkStr "state #$ID, $STAT, $TIME" '' entry_format = defaultNullOpts.mkStr "state #$ID, $STAT, $TIME" ''
The format to show on telescope for the different versions of the file. The format to show on telescope for the different versions of the file.
''; '';
time_format = helpers.defaultNullOpts.mkStr "" '' time_format = defaultNullOpts.mkStr "" ''
Can be set to a [Lua date format string](https://www.lua.org/pil/22.1.html). Can be set to a [Lua date format string](https://www.lua.org/pil/22.1.html).
''; '';