mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugins/telescope: migrate helpers -> lib.nixvim
This commit is contained in:
parent
d7b506efdd
commit
83c2844bec
9 changed files with 390 additions and 441 deletions
|
@ -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.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -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 =
|
||||||
|
|
|
@ -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.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -1,164 +1,154 @@
|
||||||
{
|
{
|
||||||
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
|
name = "frecency";
|
||||||
pkgs
|
defaultPackage = pkgs.vimPlugins.telescope-frecency-nvim;
|
||||||
;
|
|
||||||
}).mkExtension
|
|
||||||
{
|
|
||||||
name = "frecency";
|
|
||||||
defaultPackage = pkgs.vimPlugins.telescope-frecency-nvim;
|
|
||||||
|
|
||||||
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
||||||
optionsRenamedToSettings = [
|
optionsRenamedToSettings = [
|
||||||
"dbRoot"
|
"dbRoot"
|
||||||
"defaultWorkspace"
|
"defaultWorkspace"
|
||||||
"ignorePatterns"
|
"ignorePatterns"
|
||||||
"showScores"
|
"showScores"
|
||||||
"workspaces"
|
"workspaces"
|
||||||
|
];
|
||||||
|
imports =
|
||||||
|
let
|
||||||
|
basePluginPath = [
|
||||||
|
"plugins"
|
||||||
|
"telescope"
|
||||||
|
"extensions"
|
||||||
|
"frecency"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
[
|
||||||
|
(mkRemovedOptionModule (
|
||||||
|
basePluginPath ++ [ "showUnindexed" ]
|
||||||
|
) "This option has been removed upstream.")
|
||||||
|
(mkRemovedOptionModule (
|
||||||
|
basePluginPath ++ [ "deviconsDisabled" ]
|
||||||
|
) "This option has been removed upstream.")
|
||||||
];
|
];
|
||||||
imports =
|
|
||||||
let
|
|
||||||
basePluginPath = [
|
|
||||||
"plugins"
|
|
||||||
"telescope"
|
|
||||||
"extensions"
|
|
||||||
"frecency"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
[
|
|
||||||
(mkRemovedOptionModule (
|
|
||||||
basePluginPath ++ [ "showUnindexed" ]
|
|
||||||
) "This option has been removed upstream.")
|
|
||||||
(mkRemovedOptionModule (
|
|
||||||
basePluginPath ++ [ "deviconsDisabled" ]
|
|
||||||
) "This option has been removed upstream.")
|
|
||||||
];
|
|
||||||
|
|
||||||
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/*"
|
||||||
"term://*"
|
"term://*"
|
||||||
]
|
]
|
||||||
''
|
''
|
||||||
Patterns in this table control which files are indexed (and subsequently which you'll see
|
Patterns in this table control which files are indexed (and subsequently which you'll see
|
||||||
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`.
|
||||||
|
|
||||||
CAUTION: When you reduce the value of this option, it removes old timestamps when you open
|
CAUTION: When you reduce the value of this option, it removes old timestamps when you open
|
||||||
the file.
|
the file.
|
||||||
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.
|
||||||
''
|
In default, it uses the tail of paths for `'LSP'` and `'CWD'` tags.
|
||||||
Show the path of the active filter before file paths.
|
You can configure this by setting a table for this option.
|
||||||
In default, it uses the tail of paths for `'LSP'` and `'CWD'` tags.
|
'';
|
||||||
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`.
|
||||||
''
|
With the default value: `null`, it uses these way below to make entries for workspace
|
||||||
This option can be set values as `"LUA"|string[]|null`.
|
files.
|
||||||
With the default value: `null`, it uses these way below to make entries for workspace
|
It tries in order until it works successfully.
|
||||||
files.
|
|
||||||
It tries in order until it works successfully.
|
|
||||||
|
|
||||||
1. `rg -.g '!.git' --files`
|
1. `rg -.g '!.git' --files`
|
||||||
2. `fdfind -Htf`
|
2. `fdfind -Htf`
|
||||||
3. `fd -Htf`
|
3. `fd -Htf`
|
||||||
4. Native Lua code (old way)
|
4. Native Lua code (old way)
|
||||||
|
|
||||||
If you like another commands, set them to this option, like
|
If you like another commands, set them to this option, like
|
||||||
```nix
|
```nix
|
||||||
workspace_scan_cmd = ["find" "." "-type" "f"];
|
workspace_scan_cmd = ["find" "." "-type" "f"];
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
db_root = "/home/my_username/path/to/db_root";
|
||||||
|
show_scores = false;
|
||||||
|
show_unindexed = true;
|
||||||
|
ignore_patterns = [
|
||||||
|
"*.git/*"
|
||||||
|
"*/tmp/*"
|
||||||
|
];
|
||||||
|
disable_devicons = false;
|
||||||
|
workspaces = {
|
||||||
|
conf = "/home/my_username/.config";
|
||||||
|
data = "/home/my_username/.local/share";
|
||||||
|
project = "/home/my_username/projects";
|
||||||
|
wiki = "/home/my_username/wiki";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
settingsExample = {
|
}
|
||||||
db_root = "/home/my_username/path/to/db_root";
|
|
||||||
show_scores = false;
|
|
||||||
show_unindexed = true;
|
|
||||||
ignore_patterns = [
|
|
||||||
"*.git/*"
|
|
||||||
"*/tmp/*"
|
|
||||||
];
|
|
||||||
disable_devicons = false;
|
|
||||||
workspaces = {
|
|
||||||
conf = "/home/my_username/.config";
|
|
||||||
data = "/home/my_username/.local/share";
|
|
||||||
project = "/home/my_username/projects";
|
|
||||||
wiki = "/home/my_username/wiki";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,60 +1,54 @@
|
||||||
{
|
{
|
||||||
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
|
name = "fzf-native";
|
||||||
pkgs
|
extensionName = "fzf";
|
||||||
;
|
defaultPackage = pkgs.vimPlugins.telescope-fzf-native-nvim;
|
||||||
}).mkExtension
|
|
||||||
{
|
|
||||||
name = "fzf-native";
|
|
||||||
extensionName = "fzf";
|
|
||||||
defaultPackage = pkgs.vimPlugins.telescope-fzf-native-nvim;
|
|
||||||
|
|
||||||
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
||||||
optionsRenamedToSettings = [
|
optionsRenamedToSettings = [
|
||||||
"fuzzy"
|
"fuzzy"
|
||||||
"overrideGenericSorter"
|
"overrideGenericSorter"
|
||||||
"overrideFileSorter"
|
"overrideFileSorter"
|
||||||
"caseMode"
|
"caseMode"
|
||||||
];
|
];
|
||||||
|
|
||||||
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"
|
||||||
] "Case mode.";
|
] "Case mode.";
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
fuzzy = false;
|
fuzzy = false;
|
||||||
override_generic_sorter = true;
|
override_generic_sorter = true;
|
||||||
override_file_sorter = false;
|
override_file_sorter = false;
|
||||||
case_mode = "ignore_case";
|
case_mode = "ignore_case";
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
# Native library is in build/libfzf.so
|
# Native library is in build/libfzf.so
|
||||||
performance.combinePlugins.pathsToLink = [ "/build" ];
|
performance.combinePlugins.pathsToLink = [ "/build" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,40 @@
|
||||||
{
|
{
|
||||||
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
|
name = "fzy-native";
|
||||||
pkgs
|
extensionName = "fzy_native";
|
||||||
;
|
defaultPackage = pkgs.vimPlugins.telescope-fzy-native-nvim;
|
||||||
}).mkExtension
|
|
||||||
{
|
|
||||||
name = "fzy-native";
|
|
||||||
extensionName = "fzy_native";
|
|
||||||
defaultPackage = pkgs.vimPlugins.telescope-fzy-native-nvim;
|
|
||||||
|
|
||||||
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
||||||
optionsRenamedToSettings = [
|
optionsRenamedToSettings = [
|
||||||
"overrideFileSorter"
|
"overrideFileSorter"
|
||||||
"overrideGenericSorter"
|
"overrideGenericSorter"
|
||||||
];
|
];
|
||||||
|
|
||||||
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.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
override_file_sorter = true;
|
override_file_sorter = true;
|
||||||
override_generic_sorter = false;
|
override_generic_sorter = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
# 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" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,148 +1,142 @@
|
||||||
{
|
{
|
||||||
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
|
name = "media-files";
|
||||||
pkgs
|
extensionName = "media_files";
|
||||||
;
|
defaultPackage = pkgs.vimPlugins.telescope-media-files-nvim;
|
||||||
}).mkExtension
|
|
||||||
{
|
|
||||||
name = "media-files";
|
|
||||||
extensionName = "media_files";
|
|
||||||
defaultPackage = pkgs.vimPlugins.telescope-media-files-nvim;
|
|
||||||
|
|
||||||
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
# TODO: introduced 2024-03-24, remove on 2024-05-24
|
||||||
imports =
|
imports =
|
||||||
let
|
let
|
||||||
telescopeExtensionsPath = [
|
telescopeExtensionsPath = [
|
||||||
"plugins"
|
"plugins"
|
||||||
"telescope"
|
"telescope"
|
||||||
"extensions"
|
"extensions"
|
||||||
];
|
|
||||||
in
|
|
||||||
mapAttrsToList
|
|
||||||
(
|
|
||||||
oldOptionName: newOptionPath:
|
|
||||||
mkRenamedOptionModule (
|
|
||||||
telescopeExtensionsPath
|
|
||||||
++ [
|
|
||||||
"media_files"
|
|
||||||
oldOptionName
|
|
||||||
]
|
|
||||||
) (telescopeExtensionsPath ++ [ "media-files" ] ++ newOptionPath)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
enable = [ "enable" ];
|
|
||||||
package = [ "package" ];
|
|
||||||
filetypes = [
|
|
||||||
"settings"
|
|
||||||
"filetypes"
|
|
||||||
];
|
|
||||||
find_cmd = [
|
|
||||||
"settings"
|
|
||||||
"find_cmd"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
extraOptions = {
|
|
||||||
dependencies =
|
|
||||||
let
|
|
||||||
mkDepOption =
|
|
||||||
{
|
|
||||||
name,
|
|
||||||
desc,
|
|
||||||
package ? pkgs.${name},
|
|
||||||
enabledByDefault ? false,
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
enable = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = enabledByDefault;
|
|
||||||
description = ''
|
|
||||||
Whether to install the ${name} dependency.
|
|
||||||
${desc}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
package = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
default = package;
|
|
||||||
description = "The package to use for the ${name} dependency.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
chafa = mkDepOption {
|
|
||||||
name = "chafa";
|
|
||||||
enabledByDefault = true;
|
|
||||||
desc = "Required for image support.";
|
|
||||||
};
|
|
||||||
|
|
||||||
imageMagick = mkDepOption {
|
|
||||||
name = "ImageMagick";
|
|
||||||
package = pkgs.imagemagick;
|
|
||||||
desc = "Required for svg previews.";
|
|
||||||
};
|
|
||||||
|
|
||||||
ffmpegthumbnailer = mkDepOption {
|
|
||||||
name = "ffmpegthumbnailer";
|
|
||||||
desc = "Required for video preview support.";
|
|
||||||
};
|
|
||||||
|
|
||||||
pdftoppm = mkDepOption {
|
|
||||||
name = "pdmtoppm";
|
|
||||||
package = pkgs.poppler_utils;
|
|
||||||
desc = "Required for pdf preview support.";
|
|
||||||
};
|
|
||||||
|
|
||||||
epub-thumbnailer = mkDepOption {
|
|
||||||
name = "epub-thumbnailer";
|
|
||||||
desc = "Required for epub preview support";
|
|
||||||
};
|
|
||||||
|
|
||||||
fontpreview = mkDepOption {
|
|
||||||
name = "fontpreview";
|
|
||||||
desc = "Required for font preview support.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = cfg: {
|
|
||||||
extraPackages = flatten (
|
|
||||||
mapAttrsToList (name: { enable, package }: optional enable package) cfg.dependencies
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
filetypes = helpers.defaultNullOpts.mkListOf types.str [
|
|
||||||
"png"
|
|
||||||
"jpg"
|
|
||||||
"gif"
|
|
||||||
"mp4"
|
|
||||||
"webm"
|
|
||||||
"pdf"
|
|
||||||
] "Filetypes whitelist.";
|
|
||||||
|
|
||||||
find_cmd = helpers.defaultNullOpts.mkStr "fd" ''
|
|
||||||
Which find command to use.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
|
||||||
filetypes = [
|
|
||||||
"png"
|
|
||||||
"webp"
|
|
||||||
"jpg"
|
|
||||||
"jpeg"
|
|
||||||
];
|
];
|
||||||
find_cmd = "rg";
|
in
|
||||||
};
|
mapAttrsToList
|
||||||
}
|
(
|
||||||
|
oldOptionName: newOptionPath:
|
||||||
|
mkRenamedOptionModule (
|
||||||
|
telescopeExtensionsPath
|
||||||
|
++ [
|
||||||
|
"media_files"
|
||||||
|
oldOptionName
|
||||||
|
]
|
||||||
|
) (telescopeExtensionsPath ++ [ "media-files" ] ++ newOptionPath)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
enable = [ "enable" ];
|
||||||
|
package = [ "package" ];
|
||||||
|
filetypes = [
|
||||||
|
"settings"
|
||||||
|
"filetypes"
|
||||||
|
];
|
||||||
|
find_cmd = [
|
||||||
|
"settings"
|
||||||
|
"find_cmd"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
extraOptions = {
|
||||||
|
dependencies =
|
||||||
|
let
|
||||||
|
mkDepOption =
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
desc,
|
||||||
|
package ? pkgs.${name},
|
||||||
|
enabledByDefault ? false,
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = enabledByDefault;
|
||||||
|
description = ''
|
||||||
|
Whether to install the ${name} dependency.
|
||||||
|
${desc}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = package;
|
||||||
|
description = "The package to use for the ${name} dependency.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
chafa = mkDepOption {
|
||||||
|
name = "chafa";
|
||||||
|
enabledByDefault = true;
|
||||||
|
desc = "Required for image support.";
|
||||||
|
};
|
||||||
|
|
||||||
|
imageMagick = mkDepOption {
|
||||||
|
name = "ImageMagick";
|
||||||
|
package = pkgs.imagemagick;
|
||||||
|
desc = "Required for svg previews.";
|
||||||
|
};
|
||||||
|
|
||||||
|
ffmpegthumbnailer = mkDepOption {
|
||||||
|
name = "ffmpegthumbnailer";
|
||||||
|
desc = "Required for video preview support.";
|
||||||
|
};
|
||||||
|
|
||||||
|
pdftoppm = mkDepOption {
|
||||||
|
name = "pdmtoppm";
|
||||||
|
package = pkgs.poppler_utils;
|
||||||
|
desc = "Required for pdf preview support.";
|
||||||
|
};
|
||||||
|
|
||||||
|
epub-thumbnailer = mkDepOption {
|
||||||
|
name = "epub-thumbnailer";
|
||||||
|
desc = "Required for epub preview support";
|
||||||
|
};
|
||||||
|
|
||||||
|
fontpreview = mkDepOption {
|
||||||
|
name = "fontpreview";
|
||||||
|
desc = "Required for font preview support.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = cfg: {
|
||||||
|
extraPackages = flatten (
|
||||||
|
mapAttrsToList (name: { enable, package }: optional enable package) cfg.dependencies
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
|
filetypes = defaultNullOpts.mkListOf types.str [
|
||||||
|
"png"
|
||||||
|
"jpg"
|
||||||
|
"gif"
|
||||||
|
"mp4"
|
||||||
|
"webm"
|
||||||
|
"pdf"
|
||||||
|
] "Filetypes whitelist.";
|
||||||
|
|
||||||
|
find_cmd = defaultNullOpts.mkStr "fd" ''
|
||||||
|
Which find command to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
filetypes = [
|
||||||
|
"png"
|
||||||
|
"webp"
|
||||||
|
"jpg"
|
||||||
|
"jpeg"
|
||||||
|
];
|
||||||
|
find_cmd = "rg";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
|
@ -1,23 +1,14 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
(import ./_helpers.nix {
|
(import ./_helpers.nix { inherit lib config pkgs; }).mkExtension {
|
||||||
inherit
|
name = "ui-select";
|
||||||
lib
|
defaultPackage = pkgs.vimPlugins.telescope-ui-select-nvim;
|
||||||
helpers
|
|
||||||
config
|
|
||||||
pkgs
|
|
||||||
;
|
|
||||||
}).mkExtension
|
|
||||||
{
|
|
||||||
name = "ui-select";
|
|
||||||
defaultPackage = pkgs.vimPlugins.telescope-ui-select-nvim;
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
specific_opts.codeactions = false;
|
specific_opts.codeactions = false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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).
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue