mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-25 23:59:48 +01:00
fix: temp descriptions
This commit is contained in:
parent
893742f6e9
commit
01e35f9877
1 changed files with 136 additions and 46 deletions
|
@ -4,19 +4,18 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption;
|
inherit (lib.options) mkEnableOption mkOption;
|
||||||
inherit (lib.types) int str listOf float bool;
|
inherit (lib.types) int str listOf float bool either enum submodule attrsOf;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||||
mkOptOfType = type: default:
|
|
||||||
mkOption {
|
|
||||||
# TODO: description
|
|
||||||
description = "See plugin docs for more info";
|
|
||||||
inherit type default;
|
|
||||||
};
|
|
||||||
|
|
||||||
setupOptions = {
|
setupOptions = {
|
||||||
defaults = {
|
defaults = {
|
||||||
vimgrep_arguments = mkOptOfType (listOf str) [
|
vimgrep_arguments = mkOption {
|
||||||
|
description = ''
|
||||||
|
Defines the command that will be used for `live_grep` and `grep_string` pickers.
|
||||||
|
Make sure that color is set to `never` because telescope does not yet interpret color codes.
|
||||||
|
'';
|
||||||
|
type = listOf str;
|
||||||
|
default = [
|
||||||
"${pkgs.ripgrep}/bin/rg"
|
"${pkgs.ripgrep}/bin/rg"
|
||||||
"--color=never"
|
"--color=never"
|
||||||
"--no-heading"
|
"--no-heading"
|
||||||
|
@ -27,34 +26,125 @@
|
||||||
"--hidden"
|
"--hidden"
|
||||||
"--no-ignore"
|
"--no-ignore"
|
||||||
];
|
];
|
||||||
pickers.find_command = mkOptOfType (listOf str) ["${pkgs.fd}/bin/fd"];
|
};
|
||||||
prompt_prefix = mkOptOfType str " ";
|
pickers.find_command = mkOption {
|
||||||
selection_caret = mkOptOfType str " ";
|
description = "cmd to use for finding files";
|
||||||
entry_prefix = mkOptOfType str " ";
|
type = either (listOf str) luaInline;
|
||||||
initial_mode = mkOptOfType str "insert";
|
default = ["${pkgs.fd}/bin/fd"];
|
||||||
selection_strategy = mkOptOfType str "reset";
|
};
|
||||||
sorting_strategy = mkOptOfType str "ascending";
|
prompt_prefix = mkOption {
|
||||||
layout_strategy = mkOptOfType str "horizontal";
|
description = "Shown in front of Telescope's prompt";
|
||||||
layout_config = {
|
type = str;
|
||||||
|
default = " ";
|
||||||
|
};
|
||||||
|
selection_caret = mkOption {
|
||||||
|
description = "Character(s) to show in front of the current selection";
|
||||||
|
type = str;
|
||||||
|
default = " ";
|
||||||
|
};
|
||||||
|
entry_prefix = mkOption {
|
||||||
|
description = "Prefix in front of each result entry. Current selection not included.";
|
||||||
|
type = str;
|
||||||
|
default = " ";
|
||||||
|
};
|
||||||
|
initial_mode = mkOption {
|
||||||
|
description = "Determines in which mode telescope starts.";
|
||||||
|
type = enum ["insert" "normal"];
|
||||||
|
default = "insert";
|
||||||
|
};
|
||||||
|
selection_strategy = mkOption {
|
||||||
|
description = "Determines how the cursor acts after each sort iteration.";
|
||||||
|
type = enum ["reset" "follow" "row" "closest" "none"];
|
||||||
|
default = "reset";
|
||||||
|
};
|
||||||
|
sorting_strategy = mkOption {
|
||||||
|
description = ''Determines the direction "better" results are sorted towards.'';
|
||||||
|
type = enum ["descending" "ascending"];
|
||||||
|
default = "ascending";
|
||||||
|
};
|
||||||
|
layout_strategy = mkOption {
|
||||||
|
description = "Determines the default layout of Telescope pickers. See `:help telescope.layout`.";
|
||||||
|
type = str;
|
||||||
|
default = "horizontal";
|
||||||
|
};
|
||||||
|
layout_config = mkOption {
|
||||||
|
description = ''
|
||||||
|
Determines the default configuration values for layout strategies.
|
||||||
|
See telescope.layout for details of the configurations options for
|
||||||
|
each strategy.
|
||||||
|
'';
|
||||||
|
default = {};
|
||||||
|
type = submodule {
|
||||||
|
options = {
|
||||||
horizontal = {
|
horizontal = {
|
||||||
prompt_position = mkOptOfType str "top";
|
prompt_position = mkOption {
|
||||||
preview_width = mkOptOfType float 0.55;
|
description = "";
|
||||||
results_width = mkOptOfType float 0.8;
|
type = str;
|
||||||
|
default = "top";
|
||||||
|
};
|
||||||
|
preview_width = mkOption {
|
||||||
|
description = "";
|
||||||
|
type = float;
|
||||||
|
default = 0.55;
|
||||||
|
};
|
||||||
|
results_width = mkOption {
|
||||||
|
description = "";
|
||||||
|
type = float;
|
||||||
|
default = 0.8;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
vertical = {
|
vertical = {
|
||||||
mirror = mkOptOfType bool false;
|
mirror = mkOption {
|
||||||
|
description = "";
|
||||||
|
type = bool;
|
||||||
|
default = false;
|
||||||
};
|
};
|
||||||
width = mkOptOfType float 0.8;
|
|
||||||
height = mkOptOfType float 0.8;
|
|
||||||
preview_cutoff = mkOptOfType int 120;
|
|
||||||
};
|
};
|
||||||
file_ignore_patterns = mkOptOfType (listOf str) ["node_modules" ".git/" "dist/" "build/" "target/" "result/"];
|
width = mkOption {
|
||||||
color_devicons = mkOptOfType bool true;
|
description = "";
|
||||||
path_display = mkOptOfType (listOf str) ["absolute"];
|
type = float;
|
||||||
set_env = {
|
default = 0.8;
|
||||||
COLORTERM = mkOptOfType str "truecolor";
|
};
|
||||||
|
height = mkOption {
|
||||||
|
description = "";
|
||||||
|
type = float;
|
||||||
|
default = 0.8;
|
||||||
|
};
|
||||||
|
preview_cutoff = mkOption {
|
||||||
|
description = "";
|
||||||
|
type = int;
|
||||||
|
default = 120;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
file_ignore_patterns = mkOption {
|
||||||
|
description = "A table of lua regex that define the files that should be ignored.";
|
||||||
|
type = listOf str;
|
||||||
|
default = ["node_modules" ".git/" "dist/" "build/" "target/" "result/"];
|
||||||
|
};
|
||||||
|
color_devicons = mkOption {
|
||||||
|
description = "Boolean if devicons should be enabled or not.";
|
||||||
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
path_display = mkOption {
|
||||||
|
description = "Determines how file paths are displayed.";
|
||||||
|
type = listOf (enum ["hidden" "tail" "absolute" "smart" "shorten" "truncate"]);
|
||||||
|
default = ["absolute"];
|
||||||
|
};
|
||||||
|
set_env = mkOption {
|
||||||
|
description = "Set an envrionment for term_previewer";
|
||||||
|
type = attrsOf str;
|
||||||
|
default = {
|
||||||
|
COLORTERM = "truecolor";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
winblend = mkOption {
|
||||||
|
description = "pseudo-transparency of keymap hints floating window";
|
||||||
|
type = int;
|
||||||
|
default = 0;
|
||||||
};
|
};
|
||||||
winblend = mkOptOfType int 0;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue