treewide: Reformat with nixfmt

This commit is contained in:
traxys 2024-05-05 19:39:35 +02:00
parent c6281260dc
commit 62f32bfc71
459 changed files with 28139 additions and 26377 deletions

View file

@ -6,10 +6,15 @@
...
}:
with lib;
(
import ./_helpers.nix {inherit lib helpers config pkgs;}
)
.mkExtension {
(import ./_helpers.nix {
inherit
lib
helpers
config
pkgs
;
}).mkExtension
{
name = "frecency";
defaultPackage = pkgs.vimPlugins.telescope-frecency-nvim;
@ -21,20 +26,23 @@ with lib;
"showScores"
"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 = {
auto_validate = helpers.defaultNullOpts.mkBool true ''
@ -74,17 +82,17 @@ with lib;
ignore_patterns =
helpers.defaultNullOpts.mkListOf types.str
''
[
"*.git/*"
"*/tmp/*"
"term://*"
]
''
''
Patterns in this table control which files are indexed (and subsequently which you'll see
in the finder results).
'';
''
[
"*.git/*"
"*/tmp/*"
"term://*"
]
''
''
Patterns in this table control which files are indexed (and subsequently which you'll see
in the finder results).
'';
max_timestamps = helpers.defaultNullOpts.mkPositiveInt 10 ''
Set the max count of timestamps DB keeps when you open files.
@ -96,19 +104,12 @@ with lib;
'';
show_filter_column =
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.
You can configure this by setting a table for this option.
'';
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.
You can configure this by setting a table for this option.
'';
show_scores = helpers.defaultNullOpts.mkBool false ''
To see the scores generated by the algorithm in the results, set this to true.
@ -119,31 +120,25 @@ with lib;
'';
workspace_scan_cmd =
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
files.
It tries in order until it works successfully.
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
files.
It tries in order until it works successfully.
1. `rg -.g '!.git' --files`
2. `fdfind -Htf`
3. `fd -Htf`
4. Native Lua code (old way)
1. `rg -.g '!.git' --files`
2. `fdfind -Htf`
3. `fd -Htf`
4. Native Lua code (old way)
If you like another commands, set them to this option, like
```nix
workspace_scan_cmd = ["find" "." "-type" "f"];
```
If you like another commands, set them to this option, like
```nix
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 "{}" ''
This attrs contains mappings of `workspace_tag` -> `workspace_directory`.
@ -156,7 +151,10 @@ with lib;
db_root = "/home/my_username/path/to/db_root";
show_scores = false;
show_unindexed = true;
ignore_patterns = ["*.git/*" "*/tmp/*"];
ignore_patterns = [
"*.git/*"
"*/tmp/*"
];
disable_devicons = false;
workspaces = {
conf = "/home/my_username/.config";