mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-16 22:11:09 +01:00
Merge branch 'nix-community:main' into main
This commit is contained in:
commit
a49903c40e
71 changed files with 1907 additions and 2446 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
in
|
in
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
@ -12,51 +11,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
options = {
|
options = {
|
||||||
mode =
|
|
||||||
defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"buffers"
|
|
||||||
"tabs"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Mode - set to `tabs` to only show tabpages instead.
|
|
||||||
'';
|
|
||||||
|
|
||||||
themable = defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not bufferline highlights can be overridden externally.
|
|
||||||
'';
|
|
||||||
|
|
||||||
numbers =
|
|
||||||
defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"none"
|
|
||||||
"ordinal"
|
|
||||||
"buffer_id"
|
|
||||||
"both"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Customize the styling of numbers.
|
|
||||||
|
|
||||||
Can also be a lua function:
|
|
||||||
```
|
|
||||||
function({ ordinal, id, lower, raise }): string
|
|
||||||
```
|
|
||||||
'';
|
|
||||||
|
|
||||||
buffer_close_icon = defaultNullOpts.mkStr "" ''
|
|
||||||
The close icon for each buffer.
|
|
||||||
'';
|
|
||||||
|
|
||||||
modified_icon = defaultNullOpts.mkStr "●" ''
|
|
||||||
The icon indicating a buffer was modified.
|
|
||||||
'';
|
|
||||||
|
|
||||||
close_icon = defaultNullOpts.mkStr "" "The close icon.";
|
|
||||||
|
|
||||||
close_command = defaultNullOpts.mkStr "bdelete! %d" ''
|
|
||||||
Command or function run when closing a buffer.
|
|
||||||
'';
|
|
||||||
|
|
||||||
custom_filter = defaultNullOpts.mkLuaFn null ''
|
custom_filter = defaultNullOpts.mkLuaFn null ''
|
||||||
```
|
```
|
||||||
fun(buf: number, bufnums: number[]): boolean
|
fun(buf: number, bufnums: number[]): boolean
|
||||||
|
|
@ -65,85 +19,11 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
NOTE: this will be called a lot so don't do any heavy processing here.
|
NOTE: this will be called a lot so don't do any heavy processing here.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
left_mouse_command = defaultNullOpts.mkStr "buffer %d" ''
|
|
||||||
Command or function run when clicking on a buffer.
|
|
||||||
'';
|
|
||||||
|
|
||||||
right_mouse_command = defaultNullOpts.mkStr "bdelete! %d" ''
|
|
||||||
Command or function run when right clicking on a buffer.
|
|
||||||
'';
|
|
||||||
|
|
||||||
middle_mouse_command = defaultNullOpts.mkStr null ''
|
|
||||||
Command or function run when middle clicking on a buffer.
|
|
||||||
'';
|
|
||||||
|
|
||||||
indicator = {
|
|
||||||
icon = defaultNullOpts.mkStr "▎" ''
|
|
||||||
Indicator icon.
|
|
||||||
|
|
||||||
This should be omitted if indicator style is not `icon`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
style = defaultNullOpts.mkEnumFirstDefault [
|
|
||||||
"icon"
|
|
||||||
"underline"
|
|
||||||
"none"
|
|
||||||
] "Indicator style.";
|
|
||||||
};
|
|
||||||
|
|
||||||
left_trunc_marker = defaultNullOpts.mkStr "" ''
|
|
||||||
Left truncation marker.
|
|
||||||
'';
|
|
||||||
|
|
||||||
right_trunc_marker = defaultNullOpts.mkStr "" ''
|
|
||||||
Right truncation marker.
|
|
||||||
'';
|
|
||||||
|
|
||||||
separator_style = defaultNullOpts.mkNullable (
|
|
||||||
with types;
|
|
||||||
oneOf [
|
|
||||||
(enum [
|
|
||||||
"slant"
|
|
||||||
"padded_slant"
|
|
||||||
"slope"
|
|
||||||
"padded_slope"
|
|
||||||
"thick"
|
|
||||||
"thin"
|
|
||||||
])
|
|
||||||
(listOfLen str 2)
|
|
||||||
rawLua
|
|
||||||
]
|
|
||||||
) "thin" "Separator style.";
|
|
||||||
|
|
||||||
name_formatter = defaultNullOpts.mkLuaFn null ''
|
name_formatter = defaultNullOpts.mkLuaFn null ''
|
||||||
A lua function that can be used to modify the buffer's label.
|
A lua function that can be used to modify the buffer's label.
|
||||||
The argument 'buf' containing a name, path and bufnr is supplied.
|
The argument 'buf' containing a name, path and bufnr is supplied.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
truncate_names = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to truncate names.
|
|
||||||
'';
|
|
||||||
|
|
||||||
tab_size = defaultNullOpts.mkInt 18 ''
|
|
||||||
Size of the tabs.
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_name_length = defaultNullOpts.mkInt 18 ''
|
|
||||||
Max length of a buffer name.
|
|
||||||
'';
|
|
||||||
|
|
||||||
color_icons = defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not to add the filetype icon highlights.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_buffer_icons = defaultNullOpts.mkBool true ''
|
|
||||||
Show buffer icons.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_buffer_close_icons = defaultNullOpts.mkBool true ''
|
|
||||||
Show buffer close icons.
|
|
||||||
'';
|
|
||||||
|
|
||||||
get_element_icon = defaultNullOpts.mkLuaFn null ''
|
get_element_icon = defaultNullOpts.mkLuaFn null ''
|
||||||
Lua function returning an element icon.
|
Lua function returning an element icon.
|
||||||
|
|
||||||
|
|
@ -152,181 +32,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
show_close_icon = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to show the close icon.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_tab_indicators = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to show the tab indicators.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_duplicate_prefix = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to show the prefix of duplicated files.
|
|
||||||
'';
|
|
||||||
|
|
||||||
duplicates_across_groups = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to consider duplicate paths in different groups as duplicates.
|
|
||||||
'';
|
|
||||||
|
|
||||||
enforce_regular_tabs = defaultNullOpts.mkBool false ''
|
|
||||||
Whether to enforce regular tabs.
|
|
||||||
'';
|
|
||||||
|
|
||||||
always_show_bufferline = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to always show the bufferline.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_toggle_bufferline = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to automatically toggle bufferline.
|
|
||||||
'';
|
|
||||||
|
|
||||||
persist_buffer_sort = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to make the buffer sort persistent.
|
|
||||||
'';
|
|
||||||
|
|
||||||
move_wraps_at_ends = defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not the move command "wraps" at the first or last position.
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_prefix_length = defaultNullOpts.mkInt 15 ''
|
|
||||||
Maximum prefix length used when a buffer is de-duplicated.
|
|
||||||
'';
|
|
||||||
|
|
||||||
sort_by =
|
|
||||||
defaultNullOpts.mkNullableWithRaw
|
|
||||||
(types.enum [
|
|
||||||
"insert_after_current"
|
|
||||||
"insert_at_end"
|
|
||||||
"id"
|
|
||||||
"extension"
|
|
||||||
"relative_directory"
|
|
||||||
"directory"
|
|
||||||
"tabs"
|
|
||||||
])
|
|
||||||
"id"
|
|
||||||
''
|
|
||||||
How to sort the buffers.
|
|
||||||
|
|
||||||
Also accepts a function with a signature `function(buffer_a, buffer_b)` allowing you to compare with custom logic.
|
|
||||||
'';
|
|
||||||
|
|
||||||
diagnostics =
|
|
||||||
defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
false
|
|
||||||
"nvim_lsp"
|
|
||||||
"coc"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Diagnostics provider.
|
|
||||||
|
|
||||||
Set to `false` to disable.
|
|
||||||
'';
|
|
||||||
|
|
||||||
diagnostics_indicator = defaultNullOpts.mkLuaFn null ''
|
diagnostics_indicator = defaultNullOpts.mkLuaFn null ''
|
||||||
Either `null` or a function that returns the diagnostics indicator.
|
Either `null` or a function that returns the diagnostics indicator.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
diagnostics_update_on_event = defaultNullOpts.mkBool true ''
|
|
||||||
Use nvim's diagnostic handler.
|
|
||||||
'';
|
|
||||||
|
|
||||||
offsets = defaultNullOpts.mkNullable (types.listOf types.attrs) null "offsets";
|
|
||||||
|
|
||||||
groups = {
|
|
||||||
items = defaultNullOpts.mkListOf types.attrs [ ] "List of groups.";
|
|
||||||
|
|
||||||
options = {
|
|
||||||
toggle_hidden_on_enter = defaultNullOpts.mkBool true ''
|
|
||||||
Re-open hidden groups on `BufEnter`.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hover = {
|
|
||||||
enabled = defaultNullOpts.mkBool false "Whether to enable hover.";
|
|
||||||
|
|
||||||
reveal = defaultNullOpts.mkListOf types.str [ ] "Whether to reveal on hover.";
|
|
||||||
|
|
||||||
delay = defaultNullOpts.mkInt 200 "Delay to reveal on hover.";
|
|
||||||
};
|
|
||||||
|
|
||||||
debug = {
|
|
||||||
logging = defaultNullOpts.mkBool false "Whether to enable logging.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
highlights =
|
|
||||||
let
|
|
||||||
highlightsOptions = [
|
|
||||||
"fill"
|
|
||||||
"background"
|
|
||||||
"tab"
|
|
||||||
"tab_selected"
|
|
||||||
"tab_separator"
|
|
||||||
"tab_separator_selected"
|
|
||||||
"tab_close"
|
|
||||||
"close_button"
|
|
||||||
"close_button_visible"
|
|
||||||
"close_button_selected"
|
|
||||||
"buffer_visible"
|
|
||||||
"buffer_selected"
|
|
||||||
"numbers"
|
|
||||||
"numbers_visible"
|
|
||||||
"numbers_selected"
|
|
||||||
"diagnostic"
|
|
||||||
"diagnostic_visible"
|
|
||||||
"diagnostic_selected"
|
|
||||||
"hint"
|
|
||||||
"hint_visible"
|
|
||||||
"hint_selected"
|
|
||||||
"hint_diagnostic"
|
|
||||||
"hint_diagnostic_visible"
|
|
||||||
"hint_diagnostic_selected"
|
|
||||||
"info"
|
|
||||||
"info_visible"
|
|
||||||
"info_selected"
|
|
||||||
"info_diagnostic"
|
|
||||||
"info_diagnostic_visible"
|
|
||||||
"info_diagnostic_selected"
|
|
||||||
"warning"
|
|
||||||
"warning_visible"
|
|
||||||
"warning_selected"
|
|
||||||
"warning_diagnostic"
|
|
||||||
"warning_diagnostic_visible"
|
|
||||||
"warning_diagnostic_selected"
|
|
||||||
"error"
|
|
||||||
"error_visible"
|
|
||||||
"error_selected"
|
|
||||||
"error_diagnostic"
|
|
||||||
"error_diagnostic_visible"
|
|
||||||
"error_diagnostic_selected"
|
|
||||||
"modified"
|
|
||||||
"modified_visible"
|
|
||||||
"modified_selected"
|
|
||||||
"duplicate"
|
|
||||||
"duplicate_visible"
|
|
||||||
"duplicate_selected"
|
|
||||||
"separator"
|
|
||||||
"separator_visible"
|
|
||||||
"separator_selected"
|
|
||||||
"indicator_visible"
|
|
||||||
"indicator_selected"
|
|
||||||
"pick"
|
|
||||||
"pick_visible"
|
|
||||||
"pick_selected"
|
|
||||||
"offset_separator"
|
|
||||||
"trunc_marker"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
lib.genAttrs highlightsOptions (
|
|
||||||
name:
|
|
||||||
defaultNullOpts.mkHighlight { } null ''
|
|
||||||
Highlight group definition for ${name}.
|
|
||||||
''
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
options = {
|
options = {
|
||||||
mode = "buffers";
|
mode = "buffers";
|
||||||
|
|
@ -429,9 +140,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
-- filter out based on arbitrary rules
|
-- filter out based on arbitrary rules
|
||||||
-- e.g. filter out vim wiki buffer from tabline in your work repo
|
-- e.g. filter out vim wiki buffer from tabline in your work repo
|
||||||
if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
|
if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
|
||||||
return true
|
return true end -- filter out by it's index number in list (don't show first buffer)
|
||||||
end
|
|
||||||
-- filter out by it's index number in list (don't show first buffer)
|
|
||||||
if buf_numbers[1] ~= buf_number then
|
if buf_numbers[1] ~= buf_number then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
warnings = lib.nixvim.mkWarnings "plugins.gitsigns" {
|
warnings = lib.nixvim.mkWarnings "plugins.gitsigns" {
|
||||||
when = (cfg.settings.trouble == true) && !config.plugins.trouble.enable;
|
when = ((cfg.settings.trouble or false) == true) && !config.plugins.trouble.enable;
|
||||||
|
|
||||||
message = ''
|
message = ''
|
||||||
You have enabled `plugins.gitsigns.settings.trouble` but `plugins.trouble.enable` is `false`.
|
You have enabled `plugins.gitsigns.settings.trouble` but `plugins.trouble.enable` is `false`.
|
||||||
|
|
|
||||||
|
|
@ -1,87 +1,8 @@
|
||||||
lib:
|
lib:
|
||||||
let
|
let
|
||||||
inherit (lib) types mkOption;
|
inherit (lib.nixvim) defaultNullOpts mkNullOrLuaFn;
|
||||||
inherit (lib.nixvim) defaultNullOpts mkNullOrOption mkNullOrLuaFn;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
signs =
|
|
||||||
let
|
|
||||||
signOptions = defaults: {
|
|
||||||
text = defaultNullOpts.mkStr defaults.text ''
|
|
||||||
Specifies the character to use for the sign.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_count = defaultNullOpts.mkBool false ''
|
|
||||||
Showing count of hunk, e.g. number of deleted lines.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
add = signOptions {
|
|
||||||
hl = "GitSignsAdd";
|
|
||||||
text = "┃";
|
|
||||||
numhl = "GitSignsAddNr";
|
|
||||||
linehl = "GitSignsAddLn";
|
|
||||||
};
|
|
||||||
change = signOptions {
|
|
||||||
hl = "GitSignsChange";
|
|
||||||
text = "┃";
|
|
||||||
numhl = "GitSignsChangeNr";
|
|
||||||
linehl = "GitSignsChangeLn";
|
|
||||||
};
|
|
||||||
delete = signOptions {
|
|
||||||
hl = "GitSignsDelete";
|
|
||||||
text = "▁";
|
|
||||||
numhl = "GitSignsDeleteNr";
|
|
||||||
linehl = "GitSignsDeleteLn";
|
|
||||||
};
|
|
||||||
topdelete = signOptions {
|
|
||||||
hl = "GitSignsDelete";
|
|
||||||
text = "▔";
|
|
||||||
numhl = "GitSignsDeleteNr";
|
|
||||||
linehl = "GitSignsDeleteLn";
|
|
||||||
};
|
|
||||||
changedelete = signOptions {
|
|
||||||
hl = "GitSignsChange";
|
|
||||||
text = "~";
|
|
||||||
numhl = "GitSignsChangeNr";
|
|
||||||
linehl = "GitSignsChangeLn";
|
|
||||||
};
|
|
||||||
untracked = signOptions {
|
|
||||||
hl = "GitSignsAdd";
|
|
||||||
text = "┆";
|
|
||||||
numhl = "GitSignsAddNr";
|
|
||||||
linehl = "GitSignsAddLn";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
worktrees =
|
|
||||||
let
|
|
||||||
worktreeType = types.submodule {
|
|
||||||
freeformType = with types; attrsOf anything;
|
|
||||||
options = {
|
|
||||||
toplevel = mkOption {
|
|
||||||
type = with lib.types; maybeRaw str;
|
|
||||||
description = ''
|
|
||||||
Path to the top-level of the parent git repository.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
gitdir = mkOption {
|
|
||||||
type = with lib.types; maybeRaw str;
|
|
||||||
description = ''
|
|
||||||
Path to the git directory of the parent git repository (typically the `.git/` directory).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
mkNullOrOption (types.listOf worktreeType) ''
|
|
||||||
Detached working trees.
|
|
||||||
If normal attaching fails, then each entry in the table is attempted with the work tree
|
|
||||||
details set.
|
|
||||||
'';
|
|
||||||
|
|
||||||
on_attach = mkNullOrLuaFn ''
|
on_attach = mkNullOrLuaFn ''
|
||||||
Callback called when attaching to a buffer. Mainly used to setup keymaps
|
Callback called when attaching to a buffer. Mainly used to setup keymaps
|
||||||
when `config.keymaps` is empty. The buffer number is passed as the first
|
when `config.keymaps` is empty. The buffer number is passed as the first
|
||||||
|
|
@ -103,135 +24,6 @@ in
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
watch_gitdir = {
|
|
||||||
enable = defaultNullOpts.mkBool true ''
|
|
||||||
When opening a file, a `libuv` watcher is placed on the respective `.git` directory to detect
|
|
||||||
when changes happen to use as a trigger to update signs.
|
|
||||||
'';
|
|
||||||
|
|
||||||
follow_files = defaultNullOpts.mkBool true ''
|
|
||||||
If a file is moved with `git mv`, switch the buffer to the new location.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
sign_priority = defaultNullOpts.mkUnsignedInt 6 ''
|
|
||||||
Priority to use for signs.
|
|
||||||
'';
|
|
||||||
|
|
||||||
signcolumn = defaultNullOpts.mkBool true ''
|
|
||||||
Enable/disable symbols in the sign column.
|
|
||||||
|
|
||||||
When enabled the highlights defined in `signs.*.hl` and symbols defined in `signs.*.text` are
|
|
||||||
used.
|
|
||||||
'';
|
|
||||||
|
|
||||||
numhl = defaultNullOpts.mkBool false ''
|
|
||||||
Enable/disable line number highlights.
|
|
||||||
|
|
||||||
When enabled the highlights defined in `signs.*.numhl` are used.
|
|
||||||
If the highlight group does not exist, then it is automatically defined and linked to the
|
|
||||||
corresponding highlight group in `signs.*.hl`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
linehl = defaultNullOpts.mkBool false ''
|
|
||||||
Enable/disable line highlights.
|
|
||||||
|
|
||||||
When enabled the highlights defined in `signs.*.linehl` are used.
|
|
||||||
If the highlight group does not exist, then it is automatically defined and linked to the
|
|
||||||
corresponding highlight group in `signs.*.hl`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
diff_opts =
|
|
||||||
let
|
|
||||||
diffOptType = types.submodule {
|
|
||||||
freeformType = with types; attrsOf anything;
|
|
||||||
options = {
|
|
||||||
algorithm =
|
|
||||||
defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"myers"
|
|
||||||
"minimal"
|
|
||||||
"patience"
|
|
||||||
"histogram"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Diff algorithm to use. Values:
|
|
||||||
- "myers" the default algorithm
|
|
||||||
- "minimal" spend extra time to generate the smallest possible diff
|
|
||||||
- "patience" patience diff algorithm
|
|
||||||
- "histogram" histogram diff algorithm
|
|
||||||
'';
|
|
||||||
|
|
||||||
internal = defaultNullOpts.mkBool false ''
|
|
||||||
Use Neovim's built in `xdiff` library for running diffs.
|
|
||||||
'';
|
|
||||||
|
|
||||||
indent_heuristic = defaultNullOpts.mkBool false ''
|
|
||||||
Use the indent heuristic for the internal diff library.
|
|
||||||
'';
|
|
||||||
|
|
||||||
vertical = defaultNullOpts.mkBool true ''
|
|
||||||
Start diff mode with vertical splits.
|
|
||||||
'';
|
|
||||||
|
|
||||||
linematch = mkNullOrOption types.int ''
|
|
||||||
Enable second-stage diff on hunks to align lines.
|
|
||||||
Requires `internal=true`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignore_blank_lines = defaultNullOpts.mkBool true ''
|
|
||||||
Ignore changes where lines are blank.
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignore_whitespace_change = defaultNullOpts.mkBool true ''
|
|
||||||
Ignore changes in amount of white space.
|
|
||||||
It should ignore adding trailing white space, but not leading white space.
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignore_whitespace = defaultNullOpts.mkBool true ''
|
|
||||||
Ignore all white space changes.
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignore_whitespace_change_at_eol = defaultNullOpts.mkBool true ''
|
|
||||||
Ignore white space changes at end of line.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
mkNullOrOption diffOptType ''
|
|
||||||
Diff options.
|
|
||||||
If set to null they are derived from the vim `diffopt`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
base = mkNullOrOption types.str ''
|
|
||||||
The object/revision to diff against.
|
|
||||||
See `|gitsigns-revision|`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
count_chars =
|
|
||||||
defaultNullOpts.mkAttrsOf types.str
|
|
||||||
{
|
|
||||||
"__unkeyed_1" = "1";
|
|
||||||
"__unkeyed_2" = "2";
|
|
||||||
"__unkeyed_3" = "3";
|
|
||||||
"__unkeyed_4" = "4";
|
|
||||||
"__unkeyed_5" = "5";
|
|
||||||
"__unkeyed_6" = "6";
|
|
||||||
"__unkeyed_7" = "7";
|
|
||||||
"__unkeyed_8" = "8";
|
|
||||||
"__unkeyed_9" = "9";
|
|
||||||
"+" = ">";
|
|
||||||
}
|
|
||||||
''
|
|
||||||
The count characters used when `signs.*.show_count` is enabled.
|
|
||||||
The `+` entry is used as a fallback. With the default, any count outside of 1-9 uses the `>`
|
|
||||||
character in the sign.
|
|
||||||
|
|
||||||
Possible use cases for this field:
|
|
||||||
- to specify unicode characters for the counts instead of 1-9.
|
|
||||||
- to define characters to be used for counts greater than 9.
|
|
||||||
'';
|
|
||||||
|
|
||||||
status_formatter = defaultNullOpts.mkLuaFn ''
|
status_formatter = defaultNullOpts.mkLuaFn ''
|
||||||
function(status)
|
function(status)
|
||||||
local added, changed, removed = status.added, status.changed, status.removed
|
local added, changed, removed = status.added, status.changed, status.removed
|
||||||
|
|
@ -248,167 +40,4 @@ in
|
||||||
return table.concat(status_txt, ' ')
|
return table.concat(status_txt, ' ')
|
||||||
end
|
end
|
||||||
'' "Function used to format `b:gitsigns_status`.";
|
'' "Function used to format `b:gitsigns_status`.";
|
||||||
|
|
||||||
max_file_length = defaultNullOpts.mkUnsignedInt 40000 ''
|
|
||||||
Max file length (in lines) to attach to.
|
|
||||||
'';
|
|
||||||
|
|
||||||
preview_config =
|
|
||||||
defaultNullOpts.mkAttrsOf types.anything
|
|
||||||
{
|
|
||||||
border = "single";
|
|
||||||
style = "minimal";
|
|
||||||
relative = "cursor";
|
|
||||||
row = 0;
|
|
||||||
col = 1;
|
|
||||||
}
|
|
||||||
''
|
|
||||||
Option overrides for the Gitsigns preview window.
|
|
||||||
Table is passed directly to `nvim_open_win`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_attach = defaultNullOpts.mkBool true ''
|
|
||||||
Automatically attach to files.
|
|
||||||
'';
|
|
||||||
|
|
||||||
attach_to_untracked = defaultNullOpts.mkBool true ''
|
|
||||||
Attach to untracked files.
|
|
||||||
'';
|
|
||||||
|
|
||||||
update_debounce = defaultNullOpts.mkUnsignedInt 100 ''
|
|
||||||
Debounce time for updates (in milliseconds).
|
|
||||||
'';
|
|
||||||
|
|
||||||
current_line_blame = defaultNullOpts.mkBool false ''
|
|
||||||
Adds an unobtrusive and customisable blame annotation at the end of the current line.
|
|
||||||
The highlight group used for the text is `GitSignsCurrentLineBlame`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
current_line_blame_opts = {
|
|
||||||
virt_text = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to show a virtual text blame annotation
|
|
||||||
'';
|
|
||||||
|
|
||||||
virt_text_pos =
|
|
||||||
defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"eol"
|
|
||||||
"overlay"
|
|
||||||
"right_align"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Blame annotation position.
|
|
||||||
|
|
||||||
Available values:
|
|
||||||
- `eol` Right after eol character.
|
|
||||||
- `overlay` Display over the specified column, without shifting the underlying text.
|
|
||||||
- `right_align` Display right aligned in the window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
delay = defaultNullOpts.mkUnsignedInt 1000 ''
|
|
||||||
Sets the delay (in milliseconds) before blame virtual text is displayed.
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignore_whitespace = defaultNullOpts.mkBool false ''
|
|
||||||
Ignore whitespace when running blame.
|
|
||||||
'';
|
|
||||||
|
|
||||||
virt_text_priority = defaultNullOpts.mkUnsignedInt 100 ''
|
|
||||||
Priority of virtual text.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
current_line_blame_formatter = defaultNullOpts.mkStr " <author>, <author_time> - <summary> " ''
|
|
||||||
String or function used to format the virtual text of `current_line_blame`.
|
|
||||||
|
|
||||||
When a string, accepts the following format specifiers:
|
|
||||||
- `<abbrev_sha>`
|
|
||||||
- `<orig_lnum>`
|
|
||||||
- `<final_lnum>`
|
|
||||||
- `<author>`
|
|
||||||
- `<author_mail>`
|
|
||||||
- `<author_time>` or `<author_time:FORMAT>`
|
|
||||||
- `<author_tz>`
|
|
||||||
- `<committer>`
|
|
||||||
- `<committer_mail>`
|
|
||||||
- `<committer_time>` or `<committer_time:FORMAT>`
|
|
||||||
- `<committer_tz>`
|
|
||||||
- `<summary>`
|
|
||||||
- `<previous>`
|
|
||||||
- `<filename>`
|
|
||||||
|
|
||||||
For `<author_time:FORMAT>` and `<committer_time:FORMAT>`, `FORMAT` can be any valid date
|
|
||||||
format that is accepted by `os.date()` with the addition of `%R` (defaults to `%Y-%m-%d`):
|
|
||||||
- `%a` abbreviated weekday name (e.g., Wed)
|
|
||||||
- `%A` full weekday name (e.g., Wednesday)
|
|
||||||
- `%b` abbreviated month name (e.g., Sep)
|
|
||||||
- `%B` full month name (e.g., September)
|
|
||||||
- `%c` date and time (e.g., 09/16/98 23:48:10)
|
|
||||||
- `%d` day of the month (16) [01-31]
|
|
||||||
- `%H` hour, using a 24-hour clock (23) [00-23]
|
|
||||||
- `%I` hour, using a 12-hour clock (11) [01-12]
|
|
||||||
- `%M` minute (48) [00-59]
|
|
||||||
- `%m` month (09) [01-12]
|
|
||||||
- `%p` either "am" or "pm" (pm)
|
|
||||||
- `%S` second (10) [00-61]
|
|
||||||
- `%w` weekday (3) [0-6 = Sunday-Saturday]
|
|
||||||
- `%x` date (e.g., 09/16/98)
|
|
||||||
- `%X` time (e.g., 23:48:10)
|
|
||||||
- `%Y` full year (1998)
|
|
||||||
- `%y` two-digit year (98) [00-99]
|
|
||||||
- `%%` the character `%´
|
|
||||||
- `%R` relative (e.g., 4 months ago)
|
|
||||||
|
|
||||||
When a function:
|
|
||||||
|
|
||||||
Parameters:
|
|
||||||
- `{name}` Git user name returned from `git config user.name`
|
|
||||||
- `{blame_info}` Table with the following keys:
|
|
||||||
- `abbrev_sha`: string
|
|
||||||
- `orig_lnum`: integer
|
|
||||||
- `final_lnum`: integer
|
|
||||||
- `author`: string
|
|
||||||
- `author_mail`: string
|
|
||||||
- `author_time`: integer
|
|
||||||
- `author_tz`: string
|
|
||||||
- `committer`: string
|
|
||||||
- `committer_mail`: string
|
|
||||||
- `committer_time`: integer
|
|
||||||
- `committer_tz`: string
|
|
||||||
- `summary`: string
|
|
||||||
- `previous`: string
|
|
||||||
- `filename`: string
|
|
||||||
- `boundary`: true?
|
|
||||||
|
|
||||||
Note that the keys map onto the output of:
|
|
||||||
`git blame --line-porcelain`
|
|
||||||
|
|
||||||
Return:
|
|
||||||
The result of this function is passed directly to the `opts.virt_text` field of
|
|
||||||
`|nvim_buf_set_extmark|` and thus must be a list of `[text, highlight]` tuples.
|
|
||||||
'';
|
|
||||||
|
|
||||||
current_line_blame_formatter_nc = defaultNullOpts.mkStr " <author>" ''
|
|
||||||
String or function used to format the virtual text of `|gitsigns-config-current_line_blame|`
|
|
||||||
for lines that aren't committed.
|
|
||||||
|
|
||||||
See `|gitsigns-config-current_line_blame_formatter|` for more information.
|
|
||||||
'';
|
|
||||||
|
|
||||||
trouble = mkNullOrOption types.bool ''
|
|
||||||
When using setqflist() or setloclist(), open Trouble instead of the
|
|
||||||
quickfix/location list window.
|
|
||||||
|
|
||||||
Default: `pcall(require, 'trouble')`
|
|
||||||
'';
|
|
||||||
|
|
||||||
word_diff = defaultNullOpts.mkBool false ''
|
|
||||||
Highlight intra-line word differences in the buffer.
|
|
||||||
Requires `config.diff_opts.internal = true`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
debug_mode = defaultNullOpts.mkBool false ''
|
|
||||||
Enables debug logging and makes the following functions available: `dump_cache`,
|
|
||||||
`debug_messages`, `clear_debug`.
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,12 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "hop";
|
name = "hop";
|
||||||
package = "hop-nvim";
|
package = "hop-nvim";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
description = ''
|
description = ''
|
||||||
A plugin allowing you to jump anywhere in a document with as few keystrokes as possible.
|
A plugin allowing you to jump anywhere in a document with as few keystrokes as possible.
|
||||||
|
|
@ -74,115 +72,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
keys = helpers.defaultNullOpts.mkStr "asdghklqwertyuiopzxcvbnmfj" ''
|
direction = lib.nixvim.mkNullOrLua ''
|
||||||
A string representing all the keys that can be part of a permutation.
|
|
||||||
Every character (key) used in the string will be used as part of a permutation.
|
|
||||||
The shortest permutation is a permutation of a single character, and, depending on the
|
|
||||||
content of your buffer, you might end up with 3-character (or more) permutations in worst
|
|
||||||
situations.
|
|
||||||
|
|
||||||
However, it is important to notice that if you decide to provide `keys`, you have to ensure
|
|
||||||
to use enough characters in the string, otherwise you might get very long sequences and a
|
|
||||||
not so pleasant experience.
|
|
||||||
'';
|
|
||||||
|
|
||||||
quit_key = helpers.defaultNullOpts.mkStr "<Esc>" ''
|
|
||||||
A string representing a key that will quit Hop mode without also feeding that key into
|
|
||||||
Neovim to be treated as a normal key press.
|
|
||||||
|
|
||||||
It is possible to quit hopping by pressing any key that is not present in |hop-config-keys|;
|
|
||||||
however, when you do this, the key normal function is also performed.
|
|
||||||
For example if, hopping in |visual-mode|, pressing <Esc> will quit hopping and also exit
|
|
||||||
|visual-mode|.
|
|
||||||
|
|
||||||
If the user presses `quit_key`, Hop will be quit without the key normal function being
|
|
||||||
performed.
|
|
||||||
For example if hopping in |visual-mode| with `quit_key` set to '<Esc>', pressing <Esc> will
|
|
||||||
quit hopping without quitting |visual-mode|.
|
|
||||||
|
|
||||||
If you don't want to use a `quit_key`, set `quit_key` to an empty string.
|
|
||||||
|
|
||||||
Note: `quit_key` should only contain a single key or be an empty string.
|
|
||||||
|
|
||||||
Note: `quit_key` should not contain a key that is also present in |hop-config-keys|.
|
|
||||||
'';
|
|
||||||
|
|
||||||
perm_method = helpers.defaultNullOpts.mkLuaFn "require'hop.perm'.TrieBacktrackFilling" ''
|
|
||||||
Permutation method to use.
|
|
||||||
|
|
||||||
Permutation methods allow to change the way permutations (i.e. hints sequence labels) are
|
|
||||||
generated internally.
|
|
||||||
There is currently only one possible option:
|
|
||||||
- `TrieBacktrackFilling`:
|
|
||||||
Permutation algorithm based on tries and backtrack filling.
|
|
||||||
|
|
||||||
This algorithm uses the full potential of |hop-config-keys| by using them all to saturate
|
|
||||||
a trie, representing all the permutations.
|
|
||||||
Once a layer is saturated, this algorithm will backtrack (from the end of the trie,
|
|
||||||
deepest first) and create a new layer in the trie, ensuring that the first permutations
|
|
||||||
will be shorter than the last ones.
|
|
||||||
|
|
||||||
Because of the last, deepest trie insertion mechanism and trie saturation, this algorithm
|
|
||||||
yields a much better distribution across your buffer, and you should get 1-sequences and
|
|
||||||
2-sequences most of the time.
|
|
||||||
Each dimension grows exponentially, so you get `keys_length²` 2-sequence keys,
|
|
||||||
`keys_length³` 3-sequence keys, etc in the worst cases.
|
|
||||||
'';
|
|
||||||
|
|
||||||
reverse_distribution = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
The default behavior for key sequence distribution in your buffer is to concentrate shorter
|
|
||||||
sequences near the cursor, grouping 1-character sequences around.
|
|
||||||
As hints get further from the cursor, the dimension of the sequences will grow, making the
|
|
||||||
furthest sequences the longest ones to type.
|
|
||||||
|
|
||||||
Set this option to `true` to reverse the density and concentrate the shortest sequences
|
|
||||||
(1-character) around the furthest words and the longest sequences around the cursor.
|
|
||||||
'';
|
|
||||||
|
|
||||||
x_bias = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
|
||||||
This Determines which hints get shorter key sequences.
|
|
||||||
The default value has a more balanced distribution around the cursor but increasing it means
|
|
||||||
that hints which are closer vertically will have a shorter key sequences.
|
|
||||||
|
|
||||||
For instance, when `x_bias` is set to 100, hints located at the end of the line will have
|
|
||||||
shorter key sequence compared to hints in the lines above or below.
|
|
||||||
'';
|
|
||||||
|
|
||||||
teasing = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Boolean value stating whether Hop should tease you when you do something you are not
|
|
||||||
supposed to.
|
|
||||||
|
|
||||||
If you find this setting annoying, feel free to turn it to `false`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
virtual_cursor = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Creates a virtual cursor in place of actual cursor when hop waits for
|
|
||||||
user input to indicate the active window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
jump_on_sole_occurrence = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Immediately jump without displaying hints if only one occurrence exists.
|
|
||||||
'';
|
|
||||||
|
|
||||||
ignore_injections = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Ignore injected languages when jumping to treesitter node.
|
|
||||||
'';
|
|
||||||
|
|
||||||
case_insensitive = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Use case-insensitive matching by default for commands requiring user input.
|
|
||||||
'';
|
|
||||||
|
|
||||||
create_hl_autocmd = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Create and set highlight autocommands to automatically apply highlights.
|
|
||||||
You will want this if you use a theme that clears all highlights before
|
|
||||||
applying its colorscheme.
|
|
||||||
'';
|
|
||||||
|
|
||||||
dim_unmatched = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not dim the unmatched text to emphasize the hint chars.
|
|
||||||
'';
|
|
||||||
|
|
||||||
direction = helpers.mkNullOrLua ''
|
|
||||||
Direction in which to hint.
|
Direction in which to hint.
|
||||||
See `|hop.hint.HintDirection|` for further details.
|
See `|hop.hint.HintDirection|` for further details.
|
||||||
|
|
||||||
|
|
@ -190,82 +80,18 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
unless overridden.
|
unless overridden.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hint_position = helpers.defaultNullOpts.mkLua "require'hop.hint'.HintPosition.BEGIN" ''
|
hint_position = lib.nixvim.defaultNullOpts.mkLua "require'hop.hint'.HintPosition.BEGIN" ''
|
||||||
Position of hint in match. See |hop.hint.HintPosition| for further
|
Position of hint in match. See |hop.hint.HintPosition| for further
|
||||||
details.
|
details.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hint_type = helpers.defaultNullOpts.mkLua "require'hop.hint'.HintType.OVERLAY" ''
|
hint_type = lib.nixvim.defaultNullOpts.mkLua "require'hop.hint'.HintType.OVERLAY" ''
|
||||||
How to show the hint char.
|
How to show the hint char.
|
||||||
|
|
||||||
Possible values:
|
Possible values:
|
||||||
- "overlay": display over the specified column, without shifting the underlying text.
|
- "overlay": display over the specified column, without shifting the underlying text.
|
||||||
- "inline": display at the specified column, and shift the buffer text to the right as needed.
|
- "inline": display at the specified column, and shift the buffer text to the right as needed.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hint_offset = helpers.defaultNullOpts.mkUnsignedInt 0 ''
|
|
||||||
Offset to apply to a jump location.
|
|
||||||
|
|
||||||
If it is non-zero, the jump target will be offset horizontally from the selected jump position
|
|
||||||
by `hint_offset` character(s).
|
|
||||||
|
|
||||||
This option can be used for emulating the motion commands |t| and |T| where the cursor is
|
|
||||||
positioned on/before the target position.
|
|
||||||
'';
|
|
||||||
|
|
||||||
current_line_only = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Apply Hop commands only to the current line.
|
|
||||||
|
|
||||||
Note: Trying to use this option along with `multi_windows` is unsound.
|
|
||||||
'';
|
|
||||||
|
|
||||||
uppercase_labels = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Display labels as uppercase.
|
|
||||||
This option only affects the displayed labels; you still select them by typing the keys on your
|
|
||||||
keyboard.
|
|
||||||
'';
|
|
||||||
|
|
||||||
yank_register = helpers.defaultNullOpts.mkStr "" ''
|
|
||||||
Determines which one of the `registers` stores the yanked text.
|
|
||||||
'';
|
|
||||||
|
|
||||||
extensions = helpers.mkNullOrOption (with types; listOf str) ''
|
|
||||||
List-table of extensions to enable (names).
|
|
||||||
As described in `|hop-extension|`, extensions for which the name in that list must have a
|
|
||||||
`register(opts)` function in their public API for Hop to correctly initialized them.
|
|
||||||
'';
|
|
||||||
|
|
||||||
multi_windows = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Enable cross-windows support and hint all the currently visible windows.
|
|
||||||
This behavior allows you to jump around any position in any buffer currently visible in a
|
|
||||||
window.
|
|
||||||
Although a powerful a feature, remember that enabling this will also generate many more
|
|
||||||
sequence combinations, so you could get deeper sequences to type (most of the time it
|
|
||||||
should be good if you have enough keys in `|hop-config-keys|`).
|
|
||||||
'';
|
|
||||||
|
|
||||||
excluded_filetypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
Skip hinting windows with the excluded filetypes.
|
|
||||||
Those windows to check filetypes are collected only when you enable `multi_windows` or
|
|
||||||
execute `MW`-commands.
|
|
||||||
This option is useful to skip the windows which are only for displaying something but not
|
|
||||||
for editing.
|
|
||||||
'';
|
|
||||||
|
|
||||||
match_mappings = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
This option allows you to specify the match mappings to use when applying the hint.
|
|
||||||
If you set a non-empty `match_mappings`, the hint will be used as a key to look up the
|
|
||||||
pattern to search for.
|
|
||||||
|
|
||||||
Currently supported mappings:~
|
|
||||||
- 'fa' : farsi characters
|
|
||||||
- 'zh' : Basic characters for Chinese
|
|
||||||
- 'zh_sc' : Simplified Chinese
|
|
||||||
- 'zh_tc' : Traditional Chinese
|
|
||||||
|
|
||||||
For example, if `match_mappings` is set to `["zh" "zh_sc"], the characters in "zh" and
|
|
||||||
"zh_sc" can be mixed to match together.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
|
|
|
||||||
|
|
@ -1,170 +1,14 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "indent-blankline";
|
name = "indent-blankline";
|
||||||
moduleName = "ibl";
|
moduleName = "ibl";
|
||||||
package = "indent-blankline-nvim";
|
package = "indent-blankline-nvim";
|
||||||
description = "This plugin adds indentation guides to Neovim.";
|
description = "This plugin adds indentation guides to Neovim.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
debounce = helpers.defaultNullOpts.mkUnsignedInt 200 ''
|
|
||||||
Sets the amount indent-blankline debounces refreshes in milliseconds.
|
|
||||||
'';
|
|
||||||
|
|
||||||
viewport_buffer = {
|
|
||||||
min = helpers.defaultNullOpts.mkUnsignedInt 30 ''
|
|
||||||
Minimum number of lines above and below of what is currently visible in the window for
|
|
||||||
which indentation guides will be generated.
|
|
||||||
'';
|
|
||||||
|
|
||||||
max = helpers.defaultNullOpts.mkUnsignedInt 500 ''
|
|
||||||
Maximum number of lines above and below of what is currently visible in the window for
|
|
||||||
which indentation guides will be generated.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
indent = {
|
|
||||||
char = helpers.defaultNullOpts.mkNullable (with types; either str (listOf str)) "▎" ''
|
|
||||||
Character, or list of characters, that get used to display the indentation guide.
|
|
||||||
Each character has to have a display width of 0 or 1.
|
|
||||||
'';
|
|
||||||
|
|
||||||
tab_char = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
|
||||||
Character, or list of characters, that get used to display the indentation guide for tabs.
|
|
||||||
Each character has to have a display width of 0 or 1.
|
|
||||||
|
|
||||||
Default: uses `|lcs-tab|` if `|'list'|` is set, otherwise, uses
|
|
||||||
`|ibl.config.indent.char|`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlight = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
|
||||||
Highlight group, or list of highlight groups, that get applied to the indentation guide.
|
|
||||||
|
|
||||||
Default: `|hl-IblIndent|`
|
|
||||||
'';
|
|
||||||
|
|
||||||
smart_indent_cap = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Caps the number of indentation levels by looking at the surrounding code.
|
|
||||||
'';
|
|
||||||
|
|
||||||
priority = helpers.defaultNullOpts.mkUnsignedInt 1 ''
|
|
||||||
Virtual text priority for the indentation guide.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
whitespace = {
|
|
||||||
highlight = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
|
||||||
Highlight group, or list of highlight groups, that get applied to the whitespace.
|
|
||||||
|
|
||||||
Default: `|hl-IblWhitespace|`
|
|
||||||
'';
|
|
||||||
|
|
||||||
remove_blankline_trail = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Removes trailing whitespace on blanklines.
|
|
||||||
|
|
||||||
Turn this off if you want to add background color to the whitespace highlight group.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
scope = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool true "Enables or disables scope.";
|
|
||||||
|
|
||||||
char = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
|
||||||
Character, or list of characters, that get used to display the scope indentation guide.
|
|
||||||
|
|
||||||
Each character has to have a display width of 0 or 1.
|
|
||||||
|
|
||||||
Default: `indent.char`
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_start = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Shows an underline on the first line of the scope.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_end = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Shows an underline on the last line of the scope.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_exact_scope = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Shows an underline on the first line of the scope starting at the exact start of the scope
|
|
||||||
(even if this is to the right of the indent guide) and an underline on the last line of
|
|
||||||
the scope ending at the exact end of the scope.
|
|
||||||
'';
|
|
||||||
|
|
||||||
injected_languages = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Checks for the current scope in injected treesitter languages.
|
|
||||||
This also influences if the scope gets excluded or not.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlight = helpers.mkNullOrOption (with types; either str (listOf str)) ''
|
|
||||||
Highlight group, or list of highlight groups, that get applied to the scope.
|
|
||||||
|
|
||||||
Default: `|hl-IblScope|`
|
|
||||||
'';
|
|
||||||
|
|
||||||
priority = helpers.defaultNullOpts.mkUnsignedInt 1024 ''
|
|
||||||
Virtual text priority for the scope.
|
|
||||||
'';
|
|
||||||
|
|
||||||
include = {
|
|
||||||
node_type = helpers.defaultNullOpts.mkAttrsOf (with types; listOf str) { } ''
|
|
||||||
Map of language to a list of node types which can be used as scope.
|
|
||||||
|
|
||||||
- Use `*` as the language to act as a wildcard for all languages.
|
|
||||||
- Use `*` as a node type to act as a wildcard for all node types.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
exclude = {
|
|
||||||
language = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
List of treesitter languages for which scope is disabled.
|
|
||||||
'';
|
|
||||||
|
|
||||||
node_type =
|
|
||||||
helpers.defaultNullOpts.mkAttrsOf (with types; (listOf str))
|
|
||||||
{
|
|
||||||
"*" = [
|
|
||||||
"source_file"
|
|
||||||
"program"
|
|
||||||
];
|
|
||||||
lua = [ "chunk" ];
|
|
||||||
python = [ "module" ];
|
|
||||||
}
|
|
||||||
''
|
|
||||||
Map of language to a list of node types which should not be used as scope.
|
|
||||||
|
|
||||||
Use `*` as a wildcard for all languages.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
exclude = {
|
|
||||||
filetypes = helpers.defaultNullOpts.mkListOf types.str [
|
|
||||||
"lspinfo"
|
|
||||||
"packer"
|
|
||||||
"checkhealth"
|
|
||||||
"help"
|
|
||||||
"man"
|
|
||||||
"gitcommit"
|
|
||||||
"TelescopePrompt"
|
|
||||||
"TelescopeResults"
|
|
||||||
"''"
|
|
||||||
] "List of filetypes for which indent-blankline is disabled.";
|
|
||||||
|
|
||||||
buftypes = helpers.defaultNullOpts.mkListOf types.str [
|
|
||||||
"terminal"
|
|
||||||
"nofile"
|
|
||||||
"quickfix"
|
|
||||||
"prompt"
|
|
||||||
] "List of buftypes for which indent-blankline is disabled.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
indent = {
|
indent = {
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,7 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib.nixvim) defaultNullOpts mkNullOrOption;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
inherit (lib) types;
|
|
||||||
in
|
in
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "lean";
|
name = "lean";
|
||||||
|
|
@ -24,132 +23,7 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
];
|
];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
lsp = defaultNullOpts.mkNullable (types.submodule {
|
|
||||||
freeformType = types.attrsOf types.anything;
|
|
||||||
options = {
|
|
||||||
enable = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to enable the Lean language server(s).
|
|
||||||
|
|
||||||
Set to `false` to disable, otherwise should be a table of options to pass to
|
|
||||||
`leanls`.
|
|
||||||
|
|
||||||
See https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#leanls
|
|
||||||
for details.
|
|
||||||
'';
|
|
||||||
|
|
||||||
on_attach = mkNullOrOption types.str ''
|
|
||||||
The LSP handler.
|
|
||||||
'';
|
|
||||||
|
|
||||||
init_options = mkNullOrOption (with types; attrsOf anything) ''
|
|
||||||
The options to configure the lean language server.
|
|
||||||
|
|
||||||
See `Lean.Lsp.InitializationOptions` for details.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}) { } "LSP settings.";
|
|
||||||
ft = {
|
|
||||||
default = defaultNullOpts.mkStr "lean" ''
|
|
||||||
The default filetype for Lean files.
|
|
||||||
'';
|
|
||||||
nomodifiable = mkNullOrOption (types.listOf types.str) ''
|
|
||||||
A list of patterns which will be used to protect any matching Lean file paths from being
|
|
||||||
accidentally modified (by marking the buffer as `nomodifiable`).
|
|
||||||
|
|
||||||
By default, this list includes the Lean standard libraries, as well as files within
|
|
||||||
dependency directories (e.g. `_target`)
|
|
||||||
|
|
||||||
Set this to an empty table to disable.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
abbreviations = {
|
|
||||||
enable = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to enable expanding of unicode abbreviations.
|
|
||||||
'';
|
|
||||||
extra = defaultNullOpts.mkAttrsOf' {
|
|
||||||
type = types.str;
|
|
||||||
pluginDefault = { };
|
|
||||||
description = ''
|
|
||||||
Additional abbreviations.
|
|
||||||
'';
|
|
||||||
example = lib.literalExpression ''
|
|
||||||
```nix
|
|
||||||
{
|
|
||||||
# Add a \wknight abbreviation to insert ♘
|
|
||||||
#
|
|
||||||
# Note that the backslash is implied, and that you of
|
|
||||||
# course may also use a snippet engine directly to do
|
|
||||||
# this if so desired.
|
|
||||||
wknight = "♘";
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
leader = defaultNullOpts.mkStr "\\" ''
|
|
||||||
Change if you don't like the backslash.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
mappings = defaultNullOpts.mkBool false ''
|
|
||||||
Whether to enable suggested mappings.
|
|
||||||
'';
|
|
||||||
infoview = {
|
|
||||||
autoopen = defaultNullOpts.mkBool true ''
|
|
||||||
Automatically open an infoview on entering a Lean buffer.
|
|
||||||
|
|
||||||
Should be a function that will be called anytime a new Lean file is opened.
|
|
||||||
Return true to open an infoview, otherwise false.
|
|
||||||
Setting this to `true` is the same as `function() return true end`, i.e. autoopen for any
|
|
||||||
Lean file, or setting it to `false` is the same as `function() return false end`,
|
|
||||||
i.e. never autoopen.
|
|
||||||
'';
|
|
||||||
autopause = defaultNullOpts.mkBool false "Set whether a new pin is automatically paused.";
|
|
||||||
width = defaultNullOpts.mkPositiveInt 50 ''
|
|
||||||
Set infoview windows' starting width.
|
|
||||||
'';
|
|
||||||
height = defaultNullOpts.mkPositiveInt 20 ''
|
|
||||||
Set infoview windows' starting height.
|
|
||||||
'';
|
|
||||||
horizontal_position = defaultNullOpts.mkEnumFirstDefault [ "bottom" "top" ] ''
|
|
||||||
Put the infoview on the top or bottom when horizontal.
|
|
||||||
'';
|
|
||||||
separate_tab = defaultNullOpts.mkBool false ''
|
|
||||||
Always open the infoview window in a separate tabpage.
|
|
||||||
Might be useful if you are using a screen reader and don't want too many dynamic updates
|
|
||||||
in the terminal at the same time.
|
|
||||||
|
|
||||||
Note that `height` and `width` will be ignored in this case.
|
|
||||||
'';
|
|
||||||
indicators = defaultNullOpts.mkEnumFirstDefault [ "auto" "always" "never" ] ''
|
|
||||||
Show indicators for pin locations when entering an infoview window.
|
|
||||||
'';
|
|
||||||
show_processing = defaultNullOpts.mkBool true "";
|
|
||||||
show_no_info_message = defaultNullOpts.mkBool false "";
|
|
||||||
use_widgets = defaultNullOpts.mkBool true "Whether to use widgets.";
|
|
||||||
mappings = defaultNullOpts.mkAttrsOf types.str {
|
|
||||||
K = "click";
|
|
||||||
"<CR>" = "click";
|
|
||||||
gd = "go_to_def";
|
|
||||||
gD = "go_to_decl";
|
|
||||||
gy = "go_to_type";
|
|
||||||
I = "mouse_enter";
|
|
||||||
i = "mouse_leave";
|
|
||||||
"<Esc>" = "clear_all";
|
|
||||||
C = "clear_all";
|
|
||||||
"<LocalLeader><Tab>" = "goto_last_window";
|
|
||||||
} "Mappings.";
|
|
||||||
};
|
|
||||||
progress_bars = {
|
|
||||||
enable = defaultNullOpts.mkBool true ''
|
|
||||||
Whether to enable the progress bars.
|
|
||||||
'';
|
|
||||||
priority = defaultNullOpts.mkUnsignedInt 10 ''
|
|
||||||
Use a different priority for the signs.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
stderr = {
|
stderr = {
|
||||||
enable = defaultNullOpts.mkBool true ''
|
|
||||||
Redirect Lean's stderr messages somewhere (to a buffer by default).
|
|
||||||
'';
|
|
||||||
height = defaultNullOpts.mkPositiveInt 5 "Height of the window.";
|
|
||||||
on_lines = defaultNullOpts.mkLuaFn "nil" ''
|
on_lines = defaultNullOpts.mkLuaFn "nil" ''
|
||||||
A callback which will be called with (multi-line) stderr output.
|
A callback which will be called with (multi-line) stderr output.
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
19
plugins/by-name/luau-lsp/default.nix
Normal file
19
plugins/by-name/luau-lsp/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "luau-lsp";
|
||||||
|
package = "luau-lsp-nvim";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
platform.type = "roblox";
|
||||||
|
types.roblox_security_level = "PluginSecurity";
|
||||||
|
|
||||||
|
sourcemap = {
|
||||||
|
enabled = true;
|
||||||
|
autogenerate = true;
|
||||||
|
rojo_project_file = "default.project.json";
|
||||||
|
sourcemap_file = "sourcemap.json";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
15
plugins/by-name/mini-animate/default.nix
Normal file
15
plugins/by-name/mini-animate/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-animate";
|
||||||
|
moduleName = "mini.animate";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
cursor.enable = true;
|
||||||
|
scroll.enable = true;
|
||||||
|
resize.enable = true;
|
||||||
|
open.enable = true;
|
||||||
|
close.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
26
plugins/by-name/mini-basics/default.nix
Normal file
26
plugins/by-name/mini-basics/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-basics";
|
||||||
|
moduleName = "mini.basics";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
options = {
|
||||||
|
basic = true;
|
||||||
|
extra_ui = false;
|
||||||
|
win_borders = "auto";
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
basic = true;
|
||||||
|
option_toggle_prefix = "\\";
|
||||||
|
windows = false;
|
||||||
|
move_with_alt = false;
|
||||||
|
};
|
||||||
|
autocommands = {
|
||||||
|
basic = true;
|
||||||
|
relnum_in_visual_mode = false;
|
||||||
|
};
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
66
plugins/by-name/mini-bracketed/default.nix
Normal file
66
plugins/by-name/mini-bracketed/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-bracketed";
|
||||||
|
moduleName = "mini.bracketed";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
buffer = {
|
||||||
|
suffix = "b";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
comment = {
|
||||||
|
suffix = "c";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
conflict = {
|
||||||
|
suffix = "x";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
diagnostic = {
|
||||||
|
suffix = "d";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
file = {
|
||||||
|
suffix = "f";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
indent = {
|
||||||
|
suffix = "i";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
jump = {
|
||||||
|
suffix = "j";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
location = {
|
||||||
|
suffix = "l";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
oldfile = {
|
||||||
|
suffix = "o";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
quickfix = {
|
||||||
|
suffix = "q";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
treesitter = {
|
||||||
|
suffix = "t";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
undo = {
|
||||||
|
suffix = "u";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
suffix = "w";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
yank = {
|
||||||
|
suffix = "y";
|
||||||
|
options = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
60
plugins/by-name/mini-clue/default.nix
Normal file
60
plugins/by-name/mini-clue/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-clue";
|
||||||
|
moduleName = "mini.clue";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
triggers = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "g";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "g";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "`";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "`";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "\"";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "\"";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "z";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "z";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
clues = [
|
||||||
|
(lib.nixvim.nestedLiteralLua "require(\"mini.clue\").gen_clues.builtin_completion()")
|
||||||
|
(lib.nixvim.nestedLiteralLua "require(\"mini.clue\").gen_clues.g()")
|
||||||
|
(lib.nixvim.nestedLiteralLua "require(\"mini.clue\").gen_clues.marks()")
|
||||||
|
(lib.nixvim.nestedLiteralLua "require(\"mini.clue\").gen_clues.registers()")
|
||||||
|
(lib.nixvim.nestedLiteralLua "require(\"mini.clue\").gen_clues.windows()")
|
||||||
|
(lib.nixvim.nestedLiteralLua "require(\"mini.clue\").gen_clues.z()")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
26
plugins/by-name/mini-comment/default.nix
Normal file
26
plugins/by-name/mini-comment/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-comment";
|
||||||
|
moduleName = "mini.comment";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
options = {
|
||||||
|
custom_commentstring = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
ignore_blank_line = false;
|
||||||
|
start_of_line = false;
|
||||||
|
pad_comment_parts = true;
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
comment = "gc";
|
||||||
|
comment_line = "gcc";
|
||||||
|
comment_visual = "gc";
|
||||||
|
textobject = "gc";
|
||||||
|
};
|
||||||
|
hooks = {
|
||||||
|
pre = lib.nixvim.nestedLiteralLua "function() end";
|
||||||
|
post = lib.nixvim.nestedLiteralLua "function() end";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
40
plugins/by-name/mini-completion/default.nix
Normal file
40
plugins/by-name/mini-completion/default.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-completion";
|
||||||
|
moduleName = "mini.completion";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
delay = {
|
||||||
|
completion = 100;
|
||||||
|
info = 100;
|
||||||
|
signature = 50;
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
info = {
|
||||||
|
height = 25;
|
||||||
|
width = 80;
|
||||||
|
border = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
signature = {
|
||||||
|
height = 25;
|
||||||
|
width = 80;
|
||||||
|
border = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lsp_completion = {
|
||||||
|
source_func = "completefunc";
|
||||||
|
auto_setup = true;
|
||||||
|
process_items = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
snippet_insert = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
fallback_action = "<C-n>";
|
||||||
|
mappings = {
|
||||||
|
force_twostep = "<C-Space>";
|
||||||
|
force_fallback = "<A-Space>";
|
||||||
|
scroll_down = "<C-f>";
|
||||||
|
scroll_up = "<C-b>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
38
plugins/by-name/mini-diff/default.nix
Normal file
38
plugins/by-name/mini-diff/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-diff";
|
||||||
|
moduleName = "mini.diff";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
view = {
|
||||||
|
style = lib.nixvim.nestedLiteralLua "vim.go.number and 'number' or 'sign'";
|
||||||
|
signs = {
|
||||||
|
add = "▒";
|
||||||
|
change = "▒";
|
||||||
|
delete = "▒";
|
||||||
|
};
|
||||||
|
priority = 199;
|
||||||
|
};
|
||||||
|
source = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
delay = {
|
||||||
|
text_change = 200;
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
apply = "gh";
|
||||||
|
reset = "gH";
|
||||||
|
textobject = "gh";
|
||||||
|
goto_first = "[H";
|
||||||
|
goto_prev = "[h";
|
||||||
|
goto_next = "]h";
|
||||||
|
goto_last = "]H";
|
||||||
|
};
|
||||||
|
options = {
|
||||||
|
algorithm = "histogram";
|
||||||
|
indent_heuristic = true;
|
||||||
|
linematch = 60;
|
||||||
|
wrap_goto = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
plugins/by-name/mini-doc/default.nix
Normal file
14
plugins/by-name/mini-doc/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-doc";
|
||||||
|
moduleName = "mini.doc";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
annotation_pattern = "^%-%-%-(%S*) ?";
|
||||||
|
default_section_id = "@text";
|
||||||
|
script_path = "scripts/minidoc.lua";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
45
plugins/by-name/mini-files/default.nix
Normal file
45
plugins/by-name/mini-files/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-files";
|
||||||
|
moduleName = "mini.files";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
content = {
|
||||||
|
filter = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
highlight = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
prefix = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
sort = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
close = "q";
|
||||||
|
go_in = "l";
|
||||||
|
go_in_plus = "L";
|
||||||
|
go_out = "h";
|
||||||
|
go_out_plus = "H";
|
||||||
|
mark_goto = "'";
|
||||||
|
mark_set = "m";
|
||||||
|
reset = "<BS>";
|
||||||
|
reveal_cwd = "@";
|
||||||
|
show_help = "g?";
|
||||||
|
synchronize = "=";
|
||||||
|
trim_left = "<";
|
||||||
|
trim_right = ">";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
permanent_delete = true;
|
||||||
|
use_as_default_explorer = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
windows = {
|
||||||
|
max_number = lib.nixvim.nestedLiteralLua "math.huge";
|
||||||
|
preview = false;
|
||||||
|
width_focus = 50;
|
||||||
|
width_nofocus = 15;
|
||||||
|
width_preview = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
plugins/by-name/mini-hipatterns/default.nix
Normal file
16
plugins/by-name/mini-hipatterns/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-hipatterns";
|
||||||
|
moduleName = "mini.hipatterns";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
highlighters = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
|
||||||
|
delay = {
|
||||||
|
text_change = 200;
|
||||||
|
scroll = 50;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
plugins/by-name/mini-indentscope/default.nix
Normal file
31
plugins/by-name/mini-indentscope/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-indentscope";
|
||||||
|
moduleName = "mini.indentscope";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
draw = {
|
||||||
|
delay = 100;
|
||||||
|
predicate = lib.nixvim.nestedLiteralLua "function (scope) return not scope.body.is_incomplete end";
|
||||||
|
priority = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
object_scope = "ii";
|
||||||
|
object_scope_with_border = "ai";
|
||||||
|
goto_top = "[i";
|
||||||
|
goto_bottom = "]i";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
border = "both";
|
||||||
|
indent_at_cursor = true;
|
||||||
|
n_lines = 10000;
|
||||||
|
try_as_border = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
symbol = "╎";
|
||||||
|
};
|
||||||
|
}
|
||||||
24
plugins/by-name/mini-jump/default.nix
Normal file
24
plugins/by-name/mini-jump/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-jump";
|
||||||
|
moduleName = "mini.jump";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
mappings = {
|
||||||
|
forward = "f";
|
||||||
|
backward = "F";
|
||||||
|
forward_till = "t";
|
||||||
|
backward_till = "T";
|
||||||
|
repeat_jump = ";";
|
||||||
|
};
|
||||||
|
|
||||||
|
delay = {
|
||||||
|
highlight = 250;
|
||||||
|
idle_stop = 10000000;
|
||||||
|
};
|
||||||
|
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
41
plugins/by-name/mini-jump2d/default.nix
Normal file
41
plugins/by-name/mini-jump2d/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-jump2d";
|
||||||
|
moduleName = "mini.jump2d";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
spotter = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
labels = "abcdefghijklmnopqrstuvwxyz";
|
||||||
|
|
||||||
|
view = {
|
||||||
|
dim = false;
|
||||||
|
n_steps_ahead = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
allowed_lines = {
|
||||||
|
blank = true;
|
||||||
|
cursor_before = true;
|
||||||
|
cursor_at = true;
|
||||||
|
cursor_after = true;
|
||||||
|
fold = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
allowed_windows = {
|
||||||
|
current = true;
|
||||||
|
not_current = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hooks = {
|
||||||
|
before_start = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
after_jump = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
start_jumping = "<CR>";
|
||||||
|
};
|
||||||
|
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
26
plugins/by-name/mini-map/default.nix
Normal file
26
plugins/by-name/mini-map/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-map";
|
||||||
|
moduleName = "mini.map";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
integrations = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
encode = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
scroll_line = "█";
|
||||||
|
scroll_view = "┃";
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
focusable = false;
|
||||||
|
side = "right";
|
||||||
|
show_integration_count = true;
|
||||||
|
width = 10;
|
||||||
|
winblend = 25;
|
||||||
|
zindex = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
plugins/by-name/mini-misc/default.nix
Normal file
14
plugins/by-name/mini-misc/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-misc";
|
||||||
|
moduleName = "mini.misc";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
make_global = [
|
||||||
|
"put"
|
||||||
|
"put_text"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
25
plugins/by-name/mini-move/default.nix
Normal file
25
plugins/by-name/mini-move/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-move";
|
||||||
|
moduleName = "mini.move";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
mappings = {
|
||||||
|
left = "<M-h>";
|
||||||
|
right = "<M-l>";
|
||||||
|
down = "<M-j>";
|
||||||
|
up = "<M-k>";
|
||||||
|
|
||||||
|
line_left = "<M-h>";
|
||||||
|
line_right = "<M-l>";
|
||||||
|
line_down = "<M-j>";
|
||||||
|
line_up = "<M-k>";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
reindent_linewise = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
26
plugins/by-name/mini-notify/default.nix
Normal file
26
plugins/by-name/mini-notify/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-notify";
|
||||||
|
moduleName = "mini.notify";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
content = {
|
||||||
|
format = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
sort = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp_progress = {
|
||||||
|
enable = true;
|
||||||
|
level = "INFO";
|
||||||
|
duration_last = 1000;
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
config = lib.literalExpression "lib.nixvim.emptyTable";
|
||||||
|
max_width_share = 0.382;
|
||||||
|
winblend = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
34
plugins/by-name/mini-operators/default.nix
Normal file
34
plugins/by-name/mini-operators/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-operators";
|
||||||
|
moduleName = "mini.operators";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
evaluate = {
|
||||||
|
prefix = "g=";
|
||||||
|
func = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
exchange = {
|
||||||
|
prefix = "gx";
|
||||||
|
reindent_linewise = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
multiply = {
|
||||||
|
prefix = "gm";
|
||||||
|
func = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
replace = {
|
||||||
|
prefix = "gr";
|
||||||
|
reindent_linewise = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
sort = {
|
||||||
|
prefix = "gs";
|
||||||
|
func = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
67
plugins/by-name/mini-pick/default.nix
Normal file
67
plugins/by-name/mini-pick/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-pick";
|
||||||
|
moduleName = "mini.pick";
|
||||||
|
|
||||||
|
dependencies = [ "ripgrep" ];
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
delay = {
|
||||||
|
async = 10;
|
||||||
|
busy = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
caret_left = "<Left>";
|
||||||
|
caret_right = "<Right>";
|
||||||
|
choose = "<CR>";
|
||||||
|
choose_in_split = "<C-s>";
|
||||||
|
choose_in_tabpage = "<C-t>";
|
||||||
|
choose_in_vsplit = "<C-v>";
|
||||||
|
choose_marked = "<M-CR>";
|
||||||
|
delete_char = "<BS>";
|
||||||
|
delete_char_right = "<Del>";
|
||||||
|
delete_left = "<C-u>";
|
||||||
|
delete_word = "<C-w>";
|
||||||
|
mark = "<C-x>";
|
||||||
|
mark_all = "<C-a>";
|
||||||
|
move_down = "<C-n>";
|
||||||
|
move_start = "<C-g>";
|
||||||
|
move_up = "<C-p>";
|
||||||
|
paste = "<C-r>";
|
||||||
|
refine = "<C-Space>";
|
||||||
|
refine_marked = "<M-Space>";
|
||||||
|
scroll_down = "<C-f>";
|
||||||
|
scroll_left = "<C-h>";
|
||||||
|
scroll_right = "<C-l>";
|
||||||
|
scroll_up = "<C-b>";
|
||||||
|
stop = "<Esc>";
|
||||||
|
toggle_info = "<S-Tab>";
|
||||||
|
toggle_preview = "<Tab>";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
content_from_bottom = false;
|
||||||
|
use_cache = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
source = {
|
||||||
|
items = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
name = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
cwd = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
match = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
show = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
preview = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
choose = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
choose_marked = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
config = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
prompt_caret = "▏";
|
||||||
|
prompt_prefix = "> ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
39
plugins/by-name/mini-sessions/default.nix
Normal file
39
plugins/by-name/mini-sessions/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-sessions";
|
||||||
|
moduleName = "mini.sessions";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
autoread = false;
|
||||||
|
autowrite = true;
|
||||||
|
file = "Session.vim";
|
||||||
|
|
||||||
|
force = {
|
||||||
|
read = false;
|
||||||
|
write = true;
|
||||||
|
delete = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
hooks = {
|
||||||
|
pre = {
|
||||||
|
read = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
write = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
delete = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
post = {
|
||||||
|
read = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
write = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
delete = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
verbose = {
|
||||||
|
read = false;
|
||||||
|
write = true;
|
||||||
|
delete = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
25
plugins/by-name/mini-snippets/default.nix
Normal file
25
plugins/by-name/mini-snippets/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-snippets";
|
||||||
|
moduleName = "mini.snippets";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
snippets = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
expand = "<C-j>";
|
||||||
|
jump_next = "<C-l>";
|
||||||
|
jump_prev = "<C-h>";
|
||||||
|
stop = "<C-c>";
|
||||||
|
};
|
||||||
|
|
||||||
|
expand = {
|
||||||
|
prepare = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
match = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
select = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
insert = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
plugins/by-name/mini-splitjoin/default.nix
Normal file
31
plugins/by-name/mini-splitjoin/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-splitjoin";
|
||||||
|
moduleName = "mini.splitjoin";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
mappings = {
|
||||||
|
toggle = "gS";
|
||||||
|
split = "";
|
||||||
|
join = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
detect = {
|
||||||
|
brackets = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
separator = ",";
|
||||||
|
exclude_regions = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
split = {
|
||||||
|
hooks_pre = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
hooks_post = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
|
||||||
|
join = {
|
||||||
|
hooks_pre = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
hooks_post = lib.nixvim.nestedLiteral (lib.literalExpression "lib.nixvim.emptyTable");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
plugins/by-name/mini-test/default.nix
Normal file
27
plugins/by-name/mini-test/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-test";
|
||||||
|
moduleName = "mini.test";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
collect = {
|
||||||
|
emulate_busted = true;
|
||||||
|
find_files = lib.nixvim.nestedLiteralLua ''
|
||||||
|
function()
|
||||||
|
return vim.fn.globpath('tests', '**/test_*.lua', true, true)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
filter_cases = lib.nixvim.nestedLiteralLua "function(case) return true end";
|
||||||
|
};
|
||||||
|
|
||||||
|
execute = {
|
||||||
|
reporter = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
stop_on_error = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
script_path = "scripts/minitest.lua";
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
27
plugins/by-name/mini-visits/default.nix
Normal file
27
plugins/by-name/mini-visits/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-visits";
|
||||||
|
moduleName = "mini.visits";
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
list = {
|
||||||
|
filter = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
sort = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
silent = false;
|
||||||
|
|
||||||
|
store = {
|
||||||
|
autowrite = true;
|
||||||
|
normalize = lib.nixvim.nestedLiteralLua "nil";
|
||||||
|
path = lib.nixvim.nestedLiteralLua "vim.fn.stdpath('data') .. '/mini-visits-index'";
|
||||||
|
};
|
||||||
|
|
||||||
|
track = {
|
||||||
|
event = "BufEnter";
|
||||||
|
delay = 1000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,171 +1,15 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
lib.nixvim.plugins.mkVimPlugin {
|
||||||
with lib.nixvim.plugins;
|
|
||||||
mkVimPlugin {
|
|
||||||
name = "molten";
|
name = "molten";
|
||||||
package = "molten-nvim";
|
package = "molten-nvim";
|
||||||
globalPrefix = "molten_";
|
globalPrefix = "molten_";
|
||||||
description = "A neovim plugin for interactively running code with the jupyter kernel. Fork of magma-nvim with improvements in image rendering, performance, and more.";
|
description = "A neovim plugin for interactively running code with the jupyter kernel. Fork of magma-nvim with improvements in image rendering, performance, and more.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
auto_image_popup = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
When true, cells that produce an image output will open the image output automatically with
|
|
||||||
python's `Image.show()`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_init_behavior = helpers.defaultNullOpts.mkStr "init" ''
|
|
||||||
When set to "raise" commands which would otherwise ask for a kernel when they're run without
|
|
||||||
a running kernel will instead raise an exception.
|
|
||||||
Useful for other plugins that want to use `pcall` and do their own error handling.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_open_html_in_browser = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Automatically open HTML outputs in a browser. related: `open_cmd`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_open_output = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Automatically open the floating output window when your cursor moves into a cell.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cover_empty_lines = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
The output window and virtual text will be shown just below the last line of code in the
|
|
||||||
cell.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cover_lines_starting_with = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
When `cover_empty_lines` is `true`, also covers lines starting with these strings.
|
|
||||||
'';
|
|
||||||
|
|
||||||
copy_output = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Copy evaluation output to clipboard automatically (requires `pyperclip`).
|
|
||||||
'';
|
|
||||||
|
|
||||||
enter_output_behavior = helpers.defaultNullOpts.mkEnumFirstDefault [
|
|
||||||
"open_then_enter"
|
|
||||||
"open_and_enter"
|
|
||||||
"no_open"
|
|
||||||
] "The behavior of [MoltenEnterOutput](https://github.com/benlubas/molten-nvim#moltenenteroutput).";
|
|
||||||
|
|
||||||
image_provider =
|
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"none"
|
|
||||||
"image.nvim"
|
|
||||||
"wezterm"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
How images are displayed.
|
|
||||||
'';
|
|
||||||
|
|
||||||
open_cmd = helpers.mkNullOrOption types.str ''
|
|
||||||
Defaults to `xdg-open` on Linux, `open` on Darwin, and `start` on Windows.
|
|
||||||
But you can override it to whatever you want.
|
|
||||||
The command is called like: `subprocess.run([open_cmd, filepath])`
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_crop_border = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
'crops' the bottom border of the output window when it would otherwise just sit at the
|
|
||||||
bottom of the screen.
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_show_more = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
When the window can't display the entire contents of the output buffer, shows the number of
|
|
||||||
extra lines in the window footer (requires nvim 10.0+ and a window border).
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_virt_lines = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Pad the main buffer with virtual lines so the floating window doesn't cover anything while
|
|
||||||
it's open.
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_win_border = helpers.defaultNullOpts.mkBorder [
|
|
||||||
""
|
|
||||||
"━"
|
|
||||||
""
|
|
||||||
""
|
|
||||||
] "output window" "";
|
|
||||||
|
|
||||||
output_win_cover_gutter = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Should the output window cover the gutter (numbers and sign col), or not.
|
|
||||||
If you change this, you probably also want to change `output_win_style`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_win_hide_on_leave = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
After leaving the output window (via `:q` or switching windows), do not attempt to redraw
|
|
||||||
the output window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_win_max_height = helpers.defaultNullOpts.mkUnsignedInt 999999 ''
|
|
||||||
Max height of the output window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_win_max_width = helpers.defaultNullOpts.mkUnsignedInt 999999 ''
|
|
||||||
Max width of the output window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
output_win_style =
|
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
false
|
|
||||||
"minimal"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Value passed to the style option in `:h nvim_open_win()`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
save_path = helpers.defaultNullOpts.mkStr {
|
|
||||||
__raw = "vim.fn.stdpath('data')..'/molten'";
|
|
||||||
} "Where to save/load data with `:MoltenSave` and `:MoltenLoad`.";
|
|
||||||
|
|
||||||
tick_rate = helpers.defaultNullOpts.mkUnsignedInt 500 ''
|
|
||||||
How often (in ms) we poll the kernel for updates.
|
|
||||||
Determines how quickly the ui will update, if you want a snappier experience, you can set
|
|
||||||
this to 150 or 200.
|
|
||||||
'';
|
|
||||||
|
|
||||||
use_border_highlights = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
When true, uses different highlights for output border depending on the state of the cell
|
|
||||||
(running, done, error).
|
|
||||||
'';
|
|
||||||
|
|
||||||
limit_output_chars = helpers.defaultNullOpts.mkUnsignedInt 1000000 ''
|
|
||||||
Limit on the number of chars in an output.
|
|
||||||
If you're lagging your editor with too much output text, decrease it.
|
|
||||||
'';
|
|
||||||
|
|
||||||
virt_lines_off_by_1 = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Allows the output window to cover exactly one line of the regular buffer when
|
|
||||||
`output_virt_lines` is `true`, also effects where `virt_text_output` is displayed.
|
|
||||||
(useful for running code in a markdown file where that covered line will just be ```).
|
|
||||||
'';
|
|
||||||
|
|
||||||
virt_text_output = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
When true, show output as virtual text below the cell, virtual text stays after leaving the
|
|
||||||
cell.
|
|
||||||
When true, output window doesn't open automatically on run.
|
|
||||||
Effected by `virt_lines_off_by_1`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
virt_text_max_lines = helpers.defaultNullOpts.mkUnsignedInt 12 ''
|
|
||||||
Max height of the virtual text.
|
|
||||||
'';
|
|
||||||
|
|
||||||
wrap_output = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Wrap output text.
|
|
||||||
'';
|
|
||||||
|
|
||||||
show_mimetype_debug = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Before any non-iostream output chunk, the mime-type for that output chunk is shown.
|
|
||||||
Meant for debugging/plugin development.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
auto_open_output = true;
|
auto_open_output = true;
|
||||||
|
|
@ -192,8 +36,8 @@ mkVimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
python3Dependencies = mkOption {
|
python3Dependencies = lib.mkOption {
|
||||||
type = with types; functionTo (listOf package);
|
type = with lib.types; functionTo (listOf package);
|
||||||
default =
|
default =
|
||||||
p: with p; [
|
p: with p; [
|
||||||
pynvim
|
pynvim
|
||||||
|
|
@ -203,7 +47,7 @@ mkVimPlugin {
|
||||||
nbformat
|
nbformat
|
||||||
ipykernel
|
ipykernel
|
||||||
];
|
];
|
||||||
defaultText = literalExpression ''
|
defaultText = lib.literalExpression ''
|
||||||
p: with p; [
|
p: with p; [
|
||||||
pynvim
|
pynvim
|
||||||
jupyter-client
|
jupyter-client
|
||||||
|
|
@ -221,7 +65,7 @@ mkVimPlugin {
|
||||||
extraPython3Packages = cfg.python3Dependencies;
|
extraPython3Packages = cfg.python3Dependencies;
|
||||||
|
|
||||||
warnings = lib.nixvim.mkWarnings "plugins.molten" {
|
warnings = lib.nixvim.mkWarnings "plugins.molten" {
|
||||||
when = cfg.settings.image_provider == "wezterm" && !config.plugins.wezterm.enable;
|
when = (cfg.settings.image_provider or null) == "wezterm" && !config.plugins.wezterm.enable;
|
||||||
|
|
||||||
message = ''
|
message = ''
|
||||||
The `wezterm` plugin is not enabled, so the `molten` plugin's `image_provider` setting will have no effect.
|
The `wezterm` plugin is not enabled, so the `molten` plugin's `image_provider` setting will have no effect.
|
||||||
|
|
|
||||||
|
|
@ -1,190 +1,12 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "nvim-lightbulb";
|
name = "nvim-lightbulb";
|
||||||
description = "The plugin shows a lightbulb in the sign column whenever a `textDocument/codeAction` is available at the current cursor position.";
|
description = "The plugin shows a lightbulb in the sign column whenever a `textDocument/codeAction` is available at the current cursor position.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
priority = helpers.defaultNullOpts.mkUnsignedInt 10 ''
|
|
||||||
Priority of the lightbulb for all handlers except float.
|
|
||||||
'';
|
|
||||||
|
|
||||||
hide_in_unfocused_buffer = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not to hide the lightbulb when the buffer is not focused.
|
|
||||||
Only works if configured during `NvimLightbulb.setup`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
link_highlights = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not to link the highlight groups automatically.
|
|
||||||
Default highlight group links:
|
|
||||||
- `LightBulbSign` -> `DiagnosticSignInfo`
|
|
||||||
- `LightBulbFloatWin` -> `DiagnosticFloatingInfo`
|
|
||||||
- `LightBulbVirtualText` -> `DiagnosticVirtualTextInfo`
|
|
||||||
- `LightBulbNumber` -> `DiagnosticSignInfo`
|
|
||||||
- `LightBulbLine` -> `CursorLine`
|
|
||||||
|
|
||||||
Only works if configured during `NvimLightbulb.setup`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
validate_config =
|
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"auto"
|
|
||||||
"always"
|
|
||||||
"never"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Perform full validation of configuration.
|
|
||||||
|
|
||||||
- "auto" only performs full validation in `NvimLightbulb.setup`.
|
|
||||||
- "always" performs full validation in `NvimLightbulb.update_lightbulb` as well.
|
|
||||||
- "never" disables config validation.
|
|
||||||
'';
|
|
||||||
|
|
||||||
action_kinds = helpers.mkNullOrOption (with types; listOf str) ''
|
|
||||||
Code action kinds to observe.
|
|
||||||
To match all code actions, set to `null`.
|
|
||||||
Otherwise, set to a list of kinds.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```nix
|
|
||||||
[
|
|
||||||
"quickfix"
|
|
||||||
"refactor.rewrite"
|
|
||||||
]
|
|
||||||
```
|
|
||||||
See: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeActionKind
|
|
||||||
'';
|
|
||||||
|
|
||||||
sign = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool true "Sign column.";
|
|
||||||
|
|
||||||
text = helpers.defaultNullOpts.mkStr "💡" ''
|
|
||||||
Text to show in the sign column.
|
|
||||||
Must be between 1-2 characters.
|
|
||||||
'';
|
|
||||||
|
|
||||||
hl = helpers.defaultNullOpts.mkStr "LightBulbSign" ''
|
|
||||||
Highlight group to highlight the sign column text.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual_text = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool false "Virtual text.";
|
|
||||||
|
|
||||||
text = helpers.defaultNullOpts.mkStr "💡" "Text to show in the virt_text.";
|
|
||||||
|
|
||||||
pos = helpers.defaultNullOpts.mkStr "eol" ''
|
|
||||||
Position of virtual text given to |nvim_buf_set_extmark|.
|
|
||||||
Can be a number representing a fixed column (see `virt_text_pos`).
|
|
||||||
Can be a string representing a position (see `virt_text_win_col`).
|
|
||||||
'';
|
|
||||||
|
|
||||||
hl = helpers.defaultNullOpts.mkStr "LightBulbVirtualText" ''
|
|
||||||
Highlight group to highlight the virtual text.
|
|
||||||
'';
|
|
||||||
|
|
||||||
hl_mode = helpers.defaultNullOpts.mkStr "combine" ''
|
|
||||||
How to combine other highlights with text highlight.
|
|
||||||
See `hl_mode` of |nvim_buf_set_extmark|.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
float = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool false "Floating window.";
|
|
||||||
|
|
||||||
text = helpers.defaultNullOpts.mkStr "💡" "Text to show in the floating window.";
|
|
||||||
|
|
||||||
hl = helpers.defaultNullOpts.mkStr "LightBulbFloatWin" ''
|
|
||||||
Highlight group to highlight the floating window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
win_opts = helpers.defaultNullOpts.mkAttrsOf types.anything { } ''
|
|
||||||
Window options.
|
|
||||||
See |vim.lsp.util.open_floating_preview| and |nvim_open_win|.
|
|
||||||
Note that some options may be overridden by |open_floating_preview|.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
status_text = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Status text.
|
|
||||||
When enabled, will allow using |NvimLightbulb.get_status_text| to retrieve the configured text.
|
|
||||||
'';
|
|
||||||
|
|
||||||
text = helpers.defaultNullOpts.mkStr "💡" "Text to set if a lightbulb is available.";
|
|
||||||
|
|
||||||
text_unavailable = helpers.defaultNullOpts.mkStr "" ''
|
|
||||||
Text to set if a lightbulb is unavailable.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
number = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool false "Number column.";
|
|
||||||
|
|
||||||
hl = helpers.defaultNullOpts.mkStr "LightBulbNumber" ''
|
|
||||||
Highlight group to highlight the number column if there is a lightbulb.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
line = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool false "Content line.";
|
|
||||||
|
|
||||||
hl = helpers.defaultNullOpts.mkStr "LightBulbLine" ''
|
|
||||||
Highlight group to highlight the line if there is a lightbulb.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
autocmd = {
|
|
||||||
enabled = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Autocmd configuration.
|
|
||||||
If enabled, automatically defines an autocmd to show the lightbulb.
|
|
||||||
If disabled, you will have to manually call |NvimLightbulb.update_lightbulb|.
|
|
||||||
Only works if configured during `NvimLightbulb.setup`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
updatetime = helpers.defaultNullOpts.mkInt 200 ''
|
|
||||||
See |updatetime|.
|
|
||||||
Set to a negative value to avoid setting the updatetime.
|
|
||||||
'';
|
|
||||||
|
|
||||||
pattern = helpers.defaultNullOpts.mkListOf types.str [ "*" ] ''
|
|
||||||
See |nvim_create_autocmd| and |autocmd-pattern|.
|
|
||||||
'';
|
|
||||||
|
|
||||||
events =
|
|
||||||
helpers.defaultNullOpts.mkListOf types.str
|
|
||||||
[
|
|
||||||
"CursorHold"
|
|
||||||
"CursorHoldI"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
See |nvim_create_autocmd|.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
ignore = {
|
|
||||||
clients = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
LSP client names to ignore.
|
|
||||||
Example: {"null-ls", "lua_ls"}
|
|
||||||
'';
|
|
||||||
|
|
||||||
ft = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
Filetypes to ignore.
|
|
||||||
Example: {"neo-tree", "lua"}
|
|
||||||
'';
|
|
||||||
|
|
||||||
actions_without_kind = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Ignore code actions without a `kind` like `refactor.rewrite`, quickfix.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
sign = {
|
sign = {
|
||||||
|
|
|
||||||
|
|
@ -1,230 +1,32 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "oil";
|
name = "oil";
|
||||||
package = "oil-nvim";
|
package = "oil-nvim";
|
||||||
description = "Neovim file explorer: edit your filesystem like a buffer.";
|
description = "Neovim file explorer: edit your filesystem like a buffer.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions =
|
|
||||||
let
|
|
||||||
dimensionType =
|
|
||||||
with types;
|
|
||||||
oneOf [
|
|
||||||
ints.unsigned
|
|
||||||
(numbers.between 0.0 1.0)
|
|
||||||
(listOf (either ints.unsigned (numbers.between 0.0 1.0)))
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
default_file_explorer = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Oil will take over directory buffers (e.g. `vim .` or `:e src/`).
|
|
||||||
Set to false if you still want to use netrw.
|
|
||||||
'';
|
|
||||||
|
|
||||||
columns = mkOption {
|
|
||||||
type =
|
|
||||||
with lib.types;
|
|
||||||
listOf (oneOf [
|
|
||||||
str
|
|
||||||
(attrsOf anything)
|
|
||||||
rawLua
|
|
||||||
]);
|
|
||||||
default = [ ];
|
|
||||||
description = ''
|
|
||||||
Columns can be specified as a string to use default arguments (e.g. `"icon"`),
|
|
||||||
or as a table to pass parameters (e.g. `{"size", highlight = "Special"}`)
|
|
||||||
|
|
||||||
Default: `["icon"]`
|
|
||||||
'';
|
|
||||||
example = [
|
|
||||||
"type"
|
|
||||||
{
|
|
||||||
__unkeyed = "icon";
|
|
||||||
highlight = "Foo";
|
|
||||||
default_file = "bar";
|
|
||||||
directory = "dir";
|
|
||||||
}
|
|
||||||
"size"
|
|
||||||
"permissions"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Buffer-local options to use for oil buffers
|
|
||||||
buf_options = {
|
|
||||||
buflisted = helpers.defaultNullOpts.mkBool false "";
|
|
||||||
|
|
||||||
bufhidden = helpers.defaultNullOpts.mkStr "hide" "";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Window-local options to use for oil buffers
|
|
||||||
win_options = {
|
|
||||||
wrap = helpers.defaultNullOpts.mkBool false "";
|
|
||||||
|
|
||||||
signcolumn = helpers.defaultNullOpts.mkStr "no" "";
|
|
||||||
|
|
||||||
cursorcolumn = helpers.defaultNullOpts.mkBool false "";
|
|
||||||
|
|
||||||
foldcolumn = helpers.defaultNullOpts.mkStr "0" "";
|
|
||||||
|
|
||||||
spell = helpers.defaultNullOpts.mkBool false "";
|
|
||||||
|
|
||||||
list = helpers.defaultNullOpts.mkBool false "";
|
|
||||||
|
|
||||||
conceallevel = helpers.defaultNullOpts.mkUnsignedInt 3 "";
|
|
||||||
|
|
||||||
concealcursor = helpers.defaultNullOpts.mkStr "nvic" "";
|
|
||||||
};
|
|
||||||
|
|
||||||
delete_to_trash = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Deleted files will be removed with the trash_command (below).
|
|
||||||
'';
|
|
||||||
|
|
||||||
skip_confirm_for_simple_edits = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Skip the confirmation popup for simple operations.
|
|
||||||
'';
|
|
||||||
|
|
||||||
prompt_save_on_select_new_entry = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Selecting a new/moved/renamed file or directory will prompt you to save changes first.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cleanup_delay_ms =
|
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either types.ints.unsigned (enum [ false ])) 2000
|
|
||||||
''
|
|
||||||
Oil will automatically delete hidden buffers after this delay.
|
|
||||||
You can set the delay to false to disable cleanup entirely.
|
|
||||||
Note that the cleanup process only starts when none of the oil buffers are currently
|
|
||||||
displayed.
|
|
||||||
'';
|
|
||||||
|
|
||||||
lsp_file_method = {
|
|
||||||
timeout_ms = helpers.defaultNullOpts.mkUnsignedInt 1000 ''
|
|
||||||
Time to wait for LSP file operations to complete before skipping.
|
|
||||||
'';
|
|
||||||
|
|
||||||
autosave_changes = helpers.defaultNullOpts.mkNullable (with types; either bool str) "false" ''
|
|
||||||
Set to true to autosave buffers that are updated with LSP `willRenameFiles`.
|
|
||||||
Set to "unmodified" to only save unmodified buffers.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
constrain_cursor =
|
|
||||||
helpers.defaultNullOpts.mkNullable (with types; either str (enum [ false ])) "editable"
|
|
||||||
''
|
|
||||||
Constrain the cursor to the editable parts of the oil buffer.
|
|
||||||
Set to `false` to disable, or "name" to keep it on the file names.
|
|
||||||
'';
|
|
||||||
|
|
||||||
experimental_watch_for_changes = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Set to true to watch the filesystem for changes and reload oil.
|
|
||||||
'';
|
|
||||||
|
|
||||||
keymaps =
|
|
||||||
helpers.defaultNullOpts.mkAttrsOf
|
|
||||||
(
|
|
||||||
with types;
|
|
||||||
oneOf [
|
|
||||||
str
|
|
||||||
(attrsOf anything)
|
|
||||||
(enum [ false ])
|
|
||||||
]
|
|
||||||
)
|
|
||||||
{
|
|
||||||
"g?" = "actions.show_help";
|
|
||||||
"<CR>" = "actions.select";
|
|
||||||
"<C-s>" = "actions.select_vsplit";
|
|
||||||
"<C-h>" = "actions.select_split";
|
|
||||||
"<C-t>" = "actions.select_tab";
|
|
||||||
"<C-p>" = "actions.preview";
|
|
||||||
"<C-c>" = "actions.close";
|
|
||||||
"<C-l>" = "actions.refresh";
|
|
||||||
"-" = "actions.parent";
|
|
||||||
"_" = "actions.open_cwd";
|
|
||||||
"`" = "actions.cd";
|
|
||||||
"~" = "actions.tcd";
|
|
||||||
"gs" = "actions.change_sort";
|
|
||||||
"gx" = "actions.open_external";
|
|
||||||
"g." = "actions.toggle_hidden";
|
|
||||||
"g\\" = "actions.toggle_trash";
|
|
||||||
}
|
|
||||||
''
|
|
||||||
Keymaps in oil buffer.
|
|
||||||
Can be any value that `vim.keymap.set` accepts OR a table of keymap options with a
|
|
||||||
`callback` (e.g. `{ callback = function() ... end, desc = "", mode = "n" }`).
|
|
||||||
Additionally, if it is a string that matches "actions.<name>", it will use the mapping at
|
|
||||||
`require("oil.actions").<name>`.
|
|
||||||
Set to `false` to remove a keymap.
|
|
||||||
See `:help oil-actions` for a list of all available actions.
|
|
||||||
'';
|
|
||||||
|
|
||||||
keymaps_help = helpers.defaultNullOpts.mkAttrsOf types.anything { border = "rounded"; } ''
|
|
||||||
Configuration for the floating keymaps help window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
use_default_keymaps = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Set to false to disable all of the above keymaps.
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
settingsOptions = {
|
||||||
view_options = {
|
view_options = {
|
||||||
show_hidden = helpers.defaultNullOpts.mkBool false ''
|
is_hidden_file = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
Show files and directories that start with "."
|
|
||||||
'';
|
|
||||||
|
|
||||||
is_hidden_file = helpers.defaultNullOpts.mkLuaFn ''
|
|
||||||
function(name, bufnr)
|
function(name, bufnr)
|
||||||
return vim.startswith(name, ".")
|
return vim.startswith(name, ".")
|
||||||
end
|
end
|
||||||
'' "This function defines what is considered a 'hidden' file.";
|
'' "This function defines what is considered a 'hidden' file.";
|
||||||
|
|
||||||
is_always_hidden = helpers.defaultNullOpts.mkLuaFn ''
|
is_always_hidden = lib.nixvim.defaultNullOpts.mkLuaFn ''
|
||||||
function(name, bufnr)
|
function(name, bufnr)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
'' "This function defines what will never be shown, even when `show_hidden` is set.";
|
'' "This function defines what will never be shown, even when `show_hidden` is set.";
|
||||||
|
|
||||||
natural_order = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Sort file names in a more intuitive order for humans.
|
|
||||||
Is less performant, so you may want to set to `false` if you work with large directories.
|
|
||||||
'';
|
|
||||||
|
|
||||||
sort =
|
|
||||||
helpers.defaultNullOpts.mkListOf (with types; listOf str)
|
|
||||||
[
|
|
||||||
[
|
|
||||||
"type"
|
|
||||||
"asc"
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"name"
|
|
||||||
"asc"
|
|
||||||
]
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Sort order can be "asc" or "desc".
|
|
||||||
See `:help oil-columns` to see which columns are sortable.
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
float = {
|
float = {
|
||||||
padding = helpers.defaultNullOpts.mkUnsignedInt 2 "Padding around the floating window.";
|
|
||||||
|
|
||||||
max_width = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
|
||||||
|
|
||||||
max_height = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
|
||||||
|
|
||||||
border = helpers.defaultNullOpts.mkBorder "rounded" "oil.open_float" "";
|
|
||||||
|
|
||||||
win_options = {
|
|
||||||
winblend = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
|
||||||
};
|
|
||||||
|
|
||||||
override =
|
override =
|
||||||
helpers.defaultNullOpts.mkLuaFn
|
lib.nixvim.defaultNullOpts.mkLuaFn
|
||||||
''
|
''
|
||||||
function(conf)
|
function(conf)
|
||||||
return conf
|
return conf
|
||||||
|
|
@ -235,122 +37,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
Change values here to customize the layout.
|
Change values here to customize the layout.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
preview = {
|
|
||||||
max_width = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`max_width = [100 0.8]` means "the lesser of 100 columns or 80% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
min_width =
|
|
||||||
helpers.defaultNullOpts.mkNullable dimensionType
|
|
||||||
[
|
|
||||||
40
|
|
||||||
0.4
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`min_width = [40 0.4]` means "the greater of 40 columns or 40% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
width = helpers.mkNullOrOption (
|
|
||||||
with types; either int (numbers.between 0.0 1.0)
|
|
||||||
) "Optionally define an integer/float for the exact width of the preview window.";
|
|
||||||
|
|
||||||
max_height = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`max_height = [80 0.9]` means "the lesser of 80 columns or 90% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
min_height =
|
|
||||||
helpers.defaultNullOpts.mkNullable dimensionType
|
|
||||||
[
|
|
||||||
5
|
|
||||||
0.1
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`min_height = [5 0.1]` means "the greater of 5 columns or 10% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
height = helpers.mkNullOrOption (
|
|
||||||
with types; either int (numbers.between 0.0 1.0)
|
|
||||||
) "Optionally define an integer/float for the exact height of the preview window.";
|
|
||||||
|
|
||||||
border = helpers.defaultNullOpts.mkStr "rounded" "";
|
|
||||||
|
|
||||||
win_options = {
|
|
||||||
winblend = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
|
||||||
};
|
|
||||||
|
|
||||||
update_on_cursor_moved = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether the preview window is automatically updated when the cursor is moved.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
progress = {
|
|
||||||
max_width = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`max_width = [100 0.8]` means "the lesser of 100 columns or 80% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
min_width =
|
|
||||||
helpers.defaultNullOpts.mkNullable dimensionType
|
|
||||||
[
|
|
||||||
40
|
|
||||||
0.4
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Width dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`min_width = [40 0.4]` means "the greater of 40 columns or 40% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
width = helpers.mkNullOrOption (
|
|
||||||
with types; either int (numbers.between 0.0 1.0)
|
|
||||||
) "Optionally define an integer/float for the exact width of the preview window.";
|
|
||||||
|
|
||||||
max_height = helpers.defaultNullOpts.mkNullable dimensionType 0.9 ''
|
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`max_height = [80 0.9]` means "the lesser of 80 columns or 90% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
min_height =
|
|
||||||
helpers.defaultNullOpts.mkNullable dimensionType
|
|
||||||
[
|
|
||||||
5
|
|
||||||
0.1
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Height dimensions can be integers or a float between 0 and 1 (e.g. 0.4 for 40%).
|
|
||||||
Can be a single value or a list of mixed integer/float types.
|
|
||||||
`min_height = [5 0.1]` means "the greater of 5 columns or 10% of total".
|
|
||||||
'';
|
|
||||||
|
|
||||||
height = helpers.mkNullOrOption (
|
|
||||||
with types; either int (numbers.between 0.0 1.0)
|
|
||||||
) "Optionally define an integer/float for the exact height of the preview window.";
|
|
||||||
|
|
||||||
border = helpers.defaultNullOpts.mkStr "rounded" "";
|
|
||||||
|
|
||||||
minimized_border = helpers.defaultNullOpts.mkStr "none" "";
|
|
||||||
|
|
||||||
win_options = {
|
|
||||||
winblend = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ssh = {
|
|
||||||
border = helpers.defaultNullOpts.mkStr "rounded" ''
|
|
||||||
Configuration for the floating SSH window.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
|
||||||
maintainers = [ lib.maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = import ./settings-options.nix lib;
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
stiffness = 0.8;
|
stiffness = 0.8;
|
||||||
trailing_stiffness = 0.5;
|
trailing_stiffness = 0.5;
|
||||||
|
|
|
||||||
|
|
@ -1,194 +0,0 @@
|
||||||
lib:
|
|
||||||
let
|
|
||||||
inherit (lib) types;
|
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
smear_between_buffers = defaultNullOpts.mkBool true ''
|
|
||||||
Smear cursor when switching buffers or windows.
|
|
||||||
'';
|
|
||||||
|
|
||||||
smear_between_neighbor_lines = defaultNullOpts.mkBool true ''
|
|
||||||
Smear cursor when moving within line or to neighbor lines.
|
|
||||||
'';
|
|
||||||
|
|
||||||
smear_to_cmd = defaultNullOpts.mkBool true ''
|
|
||||||
Smear cursor when entering or leaving command line mode.
|
|
||||||
'';
|
|
||||||
|
|
||||||
scroll_buffer_space = defaultNullOpts.mkBool true ''
|
|
||||||
Draw the smear in buffer space instead of screen space when scrolling.
|
|
||||||
'';
|
|
||||||
|
|
||||||
legacy_computing_symbols_support = defaultNullOpts.mkBool false ''
|
|
||||||
Set to `true` if your font supports legacy computing symbols (block unicode symbols).
|
|
||||||
Smears will blend better on all backgrounds.
|
|
||||||
'';
|
|
||||||
|
|
||||||
vertical_bar_cursor = defaultNullOpts.mkBool false ''
|
|
||||||
Set to `true` if your cursor is a vertical bar in normal mode.
|
|
||||||
|
|
||||||
Use with `matrix_pixel_threshold = 0.3`
|
|
||||||
'';
|
|
||||||
|
|
||||||
hide_target_hack = defaultNullOpts.mkBool true ''
|
|
||||||
Attempt to hide the real cursor by drawing a character below it.
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_kept_windows = defaultNullOpts.mkUnsignedInt 50 ''
|
|
||||||
Number of windows that stay open for rendering.
|
|
||||||
'';
|
|
||||||
|
|
||||||
windows_zindex = defaultNullOpts.mkUnsignedInt 300 ''
|
|
||||||
Adjust to have the smear appear above or below other floating windows.
|
|
||||||
'';
|
|
||||||
|
|
||||||
filetypes_disabled = defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
List of filetypes where the plugin is disabled.
|
|
||||||
'';
|
|
||||||
|
|
||||||
time_interval = defaultNullOpts.mkUnsignedInt 17 ''
|
|
||||||
Sets animation framerate (in milliseconds).
|
|
||||||
'';
|
|
||||||
|
|
||||||
delay_animation_start = defaultNullOpts.mkUnsignedInt 5 ''
|
|
||||||
After changing target position, wait before triggering animation.
|
|
||||||
|
|
||||||
Useful if the target changes and rapidly comes back to its original position.
|
|
||||||
E.g. when hitting a keybinding that triggers `CmdlineEnter`.
|
|
||||||
Increase if the cursor makes weird jumps when hitting keys.
|
|
||||||
|
|
||||||
The value should be expressed in milliseconds.
|
|
||||||
'';
|
|
||||||
|
|
||||||
stiffness = defaultNullOpts.mkProportion 0.6 ''
|
|
||||||
How fast the smear's head moves towards the target.
|
|
||||||
|
|
||||||
`0`: no movement, `1`: instantaneous
|
|
||||||
'';
|
|
||||||
|
|
||||||
trailing_stiffness = defaultNullOpts.mkProportion 0.3 ''
|
|
||||||
How fast the smear's tail moves towards the target.
|
|
||||||
|
|
||||||
`0`: no movement, `1`: instantaneous
|
|
||||||
'';
|
|
||||||
|
|
||||||
trailing_exponent = defaultNullOpts.mkNum 2 ''
|
|
||||||
Controls if middle points are closer to the head or the tail.
|
|
||||||
|
|
||||||
`< 1`: closer to the tail, `> 1`: closer to the head
|
|
||||||
'';
|
|
||||||
|
|
||||||
slowdown_exponent = defaultNullOpts.mkNum 0 ''
|
|
||||||
How much the smear slows down when getting close to the target.
|
|
||||||
|
|
||||||
`< 0`: less slowdown, `> 0`: more slowdown. Keep small, e.g. `[-0.2, 0.2]`
|
|
||||||
'';
|
|
||||||
|
|
||||||
distance_stop_animating = defaultNullOpts.mkNum 0.1 ''
|
|
||||||
Stop animating when the smear's tail is within this distance (in characters) from the target.
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_slope_horizontal = defaultNullOpts.mkNum 0.5 ''
|
|
||||||
When to switch between rasterization methods.
|
|
||||||
'';
|
|
||||||
|
|
||||||
min_slope_vertical = defaultNullOpts.mkNum 2 ''
|
|
||||||
When to switch between rasterization methods.
|
|
||||||
'';
|
|
||||||
|
|
||||||
color_levels = defaultNullOpts.mkUnsignedInt 16 ''
|
|
||||||
Minimum `1`, don't set manually if using `cterm_cursor_colors`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
gamma = defaultNullOpts.mkFloat 2.2 ''
|
|
||||||
For color blending.
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_shade_no_matrix = defaultNullOpts.mkProportion 0.75 ''
|
|
||||||
`0`: more overhangs, `1`: more matrices
|
|
||||||
'';
|
|
||||||
|
|
||||||
matrix_pixel_threshold = defaultNullOpts.mkProportion 0.7 ''
|
|
||||||
`0`: all pixels, `1`: no pixel
|
|
||||||
'';
|
|
||||||
|
|
||||||
matrix_pixel_min_factor = defaultNullOpts.mkProportion 0.5 ''
|
|
||||||
`0`: all pixels, `1`: no pixel
|
|
||||||
'';
|
|
||||||
|
|
||||||
volume_reduction_exponent = defaultNullOpts.mkProportion 0.3 ''
|
|
||||||
`0`: no reduction, `1`: full reduction
|
|
||||||
'';
|
|
||||||
|
|
||||||
minimum_volume_factor = defaultNullOpts.mkProportion 0.7 ''
|
|
||||||
`0`: no limit, `1`: no reduction
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_length = defaultNullOpts.mkUnsignedInt 25 ''
|
|
||||||
Maximum smear length.
|
|
||||||
'';
|
|
||||||
|
|
||||||
logging_level = defaultNullOpts.mkUnsignedInt (lib.nixvim.literalLua "vim.log.levels.INFO") ''
|
|
||||||
Log level (for debugging purposes).
|
|
||||||
|
|
||||||
Also set `trailing_stiffness` to `0` for debugging.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
####################################################################################################
|
|
||||||
# Color configuration
|
|
||||||
####################################################################################################
|
|
||||||
// (
|
|
||||||
let
|
|
||||||
colorType = with types; either str ints.unsigned;
|
|
||||||
mkColor = defaultNullOpts.mkNullable colorType;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
cursor_color = mkColor null ''
|
|
||||||
Smear cursor color.
|
|
||||||
|
|
||||||
Defaults to Cursor GUI color if not set.
|
|
||||||
Set to `"none"` to match the text color at the target cursor position.
|
|
||||||
'';
|
|
||||||
|
|
||||||
normal_bg = mkColor null ''
|
|
||||||
Background color.
|
|
||||||
|
|
||||||
Defaults to Normal GUI background color if not set.
|
|
||||||
'';
|
|
||||||
|
|
||||||
transparent_bg_fallback_color = mkColor "303030" ''
|
|
||||||
Set when the background is transparent and when not using legacy computing symbols.
|
|
||||||
'';
|
|
||||||
|
|
||||||
cterm_cursor_colors =
|
|
||||||
defaultNullOpts.mkListOf colorType
|
|
||||||
[
|
|
||||||
240
|
|
||||||
241
|
|
||||||
242
|
|
||||||
243
|
|
||||||
244
|
|
||||||
245
|
|
||||||
246
|
|
||||||
247
|
|
||||||
248
|
|
||||||
249
|
|
||||||
250
|
|
||||||
251
|
|
||||||
252
|
|
||||||
253
|
|
||||||
254
|
|
||||||
255
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Cterm color gradient, from bg color (excluded) to cursor color (included).
|
|
||||||
'';
|
|
||||||
|
|
||||||
cterm_bg = mkColor 235 ''
|
|
||||||
Cterm background color.
|
|
||||||
|
|
||||||
Must set when not using legacy computing symbols.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
@ -1,18 +1,19 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
let
|
||||||
|
inherit (lib) types;
|
||||||
|
in
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "toggleterm";
|
name = "toggleterm";
|
||||||
package = "toggleterm-nvim";
|
package = "toggleterm-nvim";
|
||||||
description = "A neovim lua plugin to help easily manage multiple terminal windows.";
|
description = "A neovim lua plugin to help easily manage multiple terminal windows.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
size = helpers.defaultNullOpts.mkStrLuaFnOr types.number 12 ''
|
size = lib.nixvim.defaultNullOpts.mkStrLuaFnOr types.number 12 ''
|
||||||
Size of the terminal.
|
Size of the terminal.
|
||||||
`size` can be a number or a function.
|
`size` can be a number or a function.
|
||||||
|
|
||||||
|
|
@ -35,164 +36,74 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
|
|
||||||
open_mapping = helpers.mkNullOrLua ''
|
open_mapping = lib.nixvim.mkNullOrLua ''
|
||||||
Setting the `open_mapping` key to use for toggling the terminal(s) will set up mappings for
|
Setting the `open_mapping` key to use for toggling the terminal(s) will set up mappings for
|
||||||
normal mode.
|
normal mode.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_create = helpers.mkNullOrLuaFn ''
|
on_create = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Function to run when the terminal is first created.
|
Function to run when the terminal is first created.
|
||||||
|
|
||||||
`fun(t: Terminal)`
|
`fun(t: Terminal)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_open = helpers.mkNullOrLuaFn ''
|
on_open = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Function to run when the terminal opens.
|
Function to run when the terminal opens.
|
||||||
|
|
||||||
`fun(t: Terminal)`
|
`fun(t: Terminal)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_close = helpers.mkNullOrLuaFn ''
|
on_close = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Function to run when the terminal closes.
|
Function to run when the terminal closes.
|
||||||
|
|
||||||
`fun(t: Terminal)`
|
`fun(t: Terminal)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_stdout = helpers.mkNullOrLuaFn ''
|
on_stdout = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Callback for processing output on stdout.
|
Callback for processing output on stdout.
|
||||||
|
|
||||||
`fun(t: Terminal, job: number, data: string[], name: string)`
|
`fun(t: Terminal, job: number, data: string[], name: string)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_stderr = helpers.mkNullOrLuaFn ''
|
on_stderr = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Callback for processing output on stderr.
|
Callback for processing output on stderr.
|
||||||
|
|
||||||
`fun(t: Terminal, job: number, data: string[], name: string)`
|
`fun(t: Terminal, job: number, data: string[], name: string)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
on_exit = helpers.mkNullOrLuaFn ''
|
on_exit = lib.nixvim.mkNullOrLuaFn ''
|
||||||
Function to run when terminal process exits.
|
Function to run when terminal process exits.
|
||||||
|
|
||||||
`fun(t: Terminal, job: number, exit_code: number, name: string)`
|
`fun(t: Terminal, job: number, exit_code: number, name: string)`
|
||||||
'';
|
'';
|
||||||
|
|
||||||
hide_numbers = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Hide the number column in toggleterm buffers.
|
|
||||||
'';
|
|
||||||
|
|
||||||
shade_filetypes = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
Shade filetypes.
|
|
||||||
'';
|
|
||||||
|
|
||||||
autochdir = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
When neovim changes it current directory the terminal will change it's own when next it's
|
|
||||||
opened.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlights = helpers.defaultNullOpts.mkAttrsOf lib.types.highlight {
|
|
||||||
NormalFloat.link = "Normal";
|
|
||||||
FloatBorder.link = "Normal";
|
|
||||||
StatusLine.gui = "NONE";
|
|
||||||
StatusLineNC = {
|
|
||||||
cterm = "italic";
|
|
||||||
gui = "NONE";
|
|
||||||
};
|
|
||||||
} "Highlights which map a highlight group name to an attrs of it's values.";
|
|
||||||
|
|
||||||
shade_terminals = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
NOTE: This option takes priority over highlights specified so if you specify Normal
|
|
||||||
highlights you should set this to `false`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
shading_factor = helpers.mkNullOrOption types.int ''
|
|
||||||
The percentage by which to lighten terminal background.
|
|
||||||
|
|
||||||
default: -30 (gets multiplied by -3 if background is light).
|
|
||||||
'';
|
|
||||||
|
|
||||||
start_in_insert = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to start toggleterm in insert mode.
|
|
||||||
'';
|
|
||||||
|
|
||||||
insert_mappings = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not the open mapping applies in insert mode.
|
|
||||||
'';
|
|
||||||
|
|
||||||
terminal_mappings = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether or not the open mapping applies in the opened terminals.
|
|
||||||
'';
|
|
||||||
|
|
||||||
persist_size = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether the terminal size should persist.
|
|
||||||
'';
|
|
||||||
|
|
||||||
persist_mode = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
If set to true (default) the previous terminal mode will be remembered.
|
|
||||||
'';
|
|
||||||
|
|
||||||
direction = helpers.defaultNullOpts.mkEnum [
|
|
||||||
"vertical"
|
|
||||||
"horizontal"
|
|
||||||
"tab"
|
|
||||||
"float"
|
|
||||||
] "horizontal" "The direction the terminal should be opened in.";
|
|
||||||
|
|
||||||
close_on_exit = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Close the terminal window when the process exits.
|
|
||||||
'';
|
|
||||||
|
|
||||||
shell = helpers.defaultNullOpts.mkStr (lib.nixvim.literalLua "vim.o.shell") ''
|
|
||||||
Change the default shell.
|
|
||||||
'';
|
|
||||||
|
|
||||||
auto_scroll = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Automatically scroll to the bottom on terminal output.
|
|
||||||
'';
|
|
||||||
|
|
||||||
float_opts = {
|
float_opts = {
|
||||||
border = helpers.mkNullOrOption lib.types.border ''
|
width = lib.nixvim.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||||
`border` = "single" | "double" | "shadow" | "curved" | ... other options supported by
|
|
||||||
`win open`.
|
|
||||||
The border key is *almost* the same as 'nvim_open_win'.
|
|
||||||
The 'curved' border is a custom border type not natively supported but implemented in this plugin.
|
|
||||||
'';
|
|
||||||
|
|
||||||
width = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
|
||||||
Width of the floating terminal. Like `size`, `width` can be a number or
|
Width of the floating terminal. Like `size`, `width` can be a number or
|
||||||
function which is passed the current terminal.
|
function which is passed the current terminal.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
height = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
height = lib.nixvim.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||||
Height of the floating terminal. Like `size`, `height` can be a number
|
Height of the floating terminal. Like `size`, `height` can be a number
|
||||||
or function which is passed the current terminal.
|
or function which is passed the current terminal.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
row = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
row = lib.nixvim.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||||
Start row of the floating terminal. Defaults to the center of the
|
Start row of the floating terminal. Defaults to the center of the
|
||||||
screen. Like `size`, `row` can be a number or function which is passed
|
screen. Like `size`, `row` can be a number or function which is passed
|
||||||
the current terminal.
|
the current terminal.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
col = helpers.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
col = lib.nixvim.defaultNullOpts.mkStrLuaFnOr types.ints.unsigned null ''
|
||||||
Start column of the floating terminal. Defaults to the center of the
|
Start column of the floating terminal. Defaults to the center of the
|
||||||
screen. Like `size`, `col` can be a number or function which is passed
|
screen. Like `size`, `col` can be a number or function which is passed
|
||||||
the current terminal.
|
the current terminal.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
winblend = helpers.defaultNullOpts.mkUnsignedInt 0 "";
|
|
||||||
|
|
||||||
zindex = helpers.mkNullOrOption types.ints.unsigned "";
|
|
||||||
|
|
||||||
title_pos = helpers.defaultNullOpts.mkStr "left" "";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
winbar = {
|
winbar = {
|
||||||
enabled = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Whether to enable winbar.
|
|
||||||
'';
|
|
||||||
|
|
||||||
name_formatter =
|
name_formatter =
|
||||||
helpers.defaultNullOpts.mkLuaFn
|
lib.nixvim.defaultNullOpts.mkLuaFn
|
||||||
''
|
''
|
||||||
function(term)
|
function(term)
|
||||||
return term.name
|
return term.name
|
||||||
|
|
|
||||||
|
|
@ -1,70 +1,17 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "treesitter-context";
|
name = "treesitter-context";
|
||||||
package = "nvim-treesitter-context";
|
package = "nvim-treesitter-context";
|
||||||
description = "Show code context.";
|
description = "Show code context.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
enable = helpers.defaultNullOpts.mkBool true ''
|
on_attach = lib.nixvim.defaultNullOpts.mkLuaFn "nil" ''
|
||||||
Enable this plugin (Can be enabled/disabled later via commands)
|
|
||||||
'';
|
|
||||||
|
|
||||||
max_lines = helpers.defaultNullOpts.mkUnsignedInt 0 ''
|
|
||||||
How many lines the window should span. 0 means no limit.
|
|
||||||
'';
|
|
||||||
|
|
||||||
min_window_height = helpers.defaultNullOpts.mkUnsignedInt 0 ''
|
|
||||||
Minimum editor window height to enable context. 0 means no limit.
|
|
||||||
'';
|
|
||||||
|
|
||||||
line_numbers = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to show line numbers.
|
|
||||||
'';
|
|
||||||
|
|
||||||
multiline_threshold = helpers.defaultNullOpts.mkUnsignedInt 20 ''
|
|
||||||
Maximum number of lines to collapse for a single context line.
|
|
||||||
'';
|
|
||||||
|
|
||||||
trim_scope =
|
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"outer"
|
|
||||||
"inner"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Which context lines to discard if `max_lines` is exceeded.
|
|
||||||
'';
|
|
||||||
|
|
||||||
mode =
|
|
||||||
helpers.defaultNullOpts.mkEnumFirstDefault
|
|
||||||
[
|
|
||||||
"cursor"
|
|
||||||
"topline"
|
|
||||||
]
|
|
||||||
''
|
|
||||||
Line used to calculate context.
|
|
||||||
'';
|
|
||||||
|
|
||||||
separator = helpers.mkNullOrOption types.str ''
|
|
||||||
Separator between context and content.
|
|
||||||
Should be a single character string, like "-".
|
|
||||||
When separator is set, the context will only show up when there are at least 2 lines above
|
|
||||||
cursorline.
|
|
||||||
'';
|
|
||||||
|
|
||||||
zindex = helpers.defaultNullOpts.mkUnsignedInt 20 ''
|
|
||||||
The Z-index of the context window.
|
|
||||||
'';
|
|
||||||
|
|
||||||
on_attach = helpers.defaultNullOpts.mkLuaFn "nil" ''
|
|
||||||
The implementation of a lua function which takes an integer `buf` as parameter and returns a
|
The implementation of a lua function which takes an integer `buf` as parameter and returns a
|
||||||
boolean.
|
boolean.
|
||||||
Return `false` to disable attaching.
|
Return `false` to disable attaching.
|
||||||
|
|
|
||||||
|
|
@ -1,60 +1,13 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
helpers,
|
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
|
||||||
lib.nixvim.plugins.mkNeovimPlugin {
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
name = "trim";
|
name = "trim";
|
||||||
package = "trim-nvim";
|
package = "trim-nvim";
|
||||||
description = "This plugin trims trailing whitespace and lines.";
|
description = "This plugin trims trailing whitespace and lines.";
|
||||||
|
|
||||||
maintainers = [ maintainers.GaetanLepage ];
|
maintainers = [ lib.maintainers.GaetanLepage ];
|
||||||
|
|
||||||
settingsOptions = {
|
|
||||||
ft_blocklist = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
|
||||||
Filetypes to exclude.
|
|
||||||
'';
|
|
||||||
|
|
||||||
patterns = mkOption {
|
|
||||||
type = with lib.types; listOf strLua;
|
|
||||||
default = [ ];
|
|
||||||
example = [ "[[%s/\(\n\n\)\n\+/\1/]]" ];
|
|
||||||
description = ''
|
|
||||||
Extra patterns to use for removing white spaces.
|
|
||||||
|
|
||||||
Plugin default: `[]`
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
trim_on_write = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to automatically trim on write.
|
|
||||||
'';
|
|
||||||
|
|
||||||
trim_trailing = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to trim trailing whitespaces.
|
|
||||||
'';
|
|
||||||
|
|
||||||
trim_last_line = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to trim trailing blank lines at the end of the file.
|
|
||||||
'';
|
|
||||||
|
|
||||||
trim_first_line = helpers.defaultNullOpts.mkBool true ''
|
|
||||||
Whether to trim blank lines at the beginning of the file.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlight = helpers.defaultNullOpts.mkBool false ''
|
|
||||||
Whether to highlight trailing whitespaces.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlight_bg = helpers.defaultNullOpts.mkStr "#ff0000" ''
|
|
||||||
Which color to use for coloring whitespaces.
|
|
||||||
'';
|
|
||||||
|
|
||||||
highlight_ctermbg = helpers.defaultNullOpts.mkStr "red" ''
|
|
||||||
Which color to use for coloring whitespaces (cterm).
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
ft_blocklist = [ "markdown" ];
|
ft_blocklist = [ "markdown" ];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
|
||||||
let
|
let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
inherit (lib.nixvim) defaultNullOpts;
|
inherit (lib.nixvim) defaultNullOpts;
|
||||||
|
|
@ -77,22 +76,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
maintainers = [ lib.maintainers.khaneliman ];
|
maintainers = [ lib.maintainers.khaneliman ];
|
||||||
|
|
||||||
settingsOptions = {
|
settingsOptions = {
|
||||||
preset = defaultNullOpts.mkEnumFirstDefault [
|
|
||||||
"classic"
|
|
||||||
"modern"
|
|
||||||
"helix"
|
|
||||||
false
|
|
||||||
] "Preset style for WhichKey. Set to false to disable.";
|
|
||||||
|
|
||||||
delay = defaultNullOpts.mkInt' {
|
|
||||||
pluginDefault = lib.nixvim.literalLua ''
|
|
||||||
function(ctx)
|
|
||||||
return ctx.plugin and 0 or 200
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
description = "Delay before showing the popup. Can be a number or a function that returns a number.";
|
|
||||||
};
|
|
||||||
|
|
||||||
filter = defaultNullOpts.mkLuaFn' {
|
filter = defaultNullOpts.mkLuaFn' {
|
||||||
pluginDefault = lib.nixvim.literalLua ''
|
pluginDefault = lib.nixvim.literalLua ''
|
||||||
function(mapping)
|
function(mapping)
|
||||||
|
|
@ -102,29 +85,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
description = "Filter used to exclude mappings";
|
description = "Filter used to exclude mappings";
|
||||||
};
|
};
|
||||||
|
|
||||||
spec = defaultNullOpts.mkListOf' {
|
|
||||||
type = with types; attrsOf anything;
|
|
||||||
pluginDefault = [ ];
|
|
||||||
description = ''
|
|
||||||
WhichKey automatically gets the descriptions of your keymaps from the desc attribute of the keymap.
|
|
||||||
So for most use-cases, you don't need to do anything else.
|
|
||||||
|
|
||||||
However, the mapping spec is still useful to configure group descriptions and mappings that don't really exist as a regular keymap.
|
|
||||||
|
|
||||||
Please refer to the plugin's [documentation](https://github.com/folke/which-key.nvim?tab=readme-ov-file#%EF%B8%8F-mappings).
|
|
||||||
'';
|
|
||||||
example = specExamples;
|
|
||||||
};
|
|
||||||
|
|
||||||
notify = defaultNullOpts.mkBool true "Show a warning when issues were detected with your mappings.";
|
|
||||||
|
|
||||||
triggers = defaultNullOpts.mkListOf (with types; attrsOf anything) [
|
|
||||||
{
|
|
||||||
__unkeyed-1 = "<auto>";
|
|
||||||
mode = "nxsot";
|
|
||||||
}
|
|
||||||
] "Manually setup triggers";
|
|
||||||
|
|
||||||
defer = defaultNullOpts.mkLuaFn' {
|
defer = defaultNullOpts.mkLuaFn' {
|
||||||
pluginDefault = lib.nixvim.literalLua ''
|
pluginDefault = lib.nixvim.literalLua ''
|
||||||
function(ctx)
|
function(ctx)
|
||||||
|
|
@ -137,199 +97,13 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = {
|
|
||||||
marks = defaultNullOpts.mkBool true ''
|
|
||||||
Shows a list of your marks on `'` and `` ` ``.
|
|
||||||
'';
|
|
||||||
|
|
||||||
registers = defaultNullOpts.mkBool true ''
|
|
||||||
Shows your registers on `"` in NORMAL or `<C-r>` in INSERT mode.
|
|
||||||
'';
|
|
||||||
|
|
||||||
spelling = {
|
|
||||||
enabled = defaultNullOpts.mkBool true ''
|
|
||||||
Enabling this will show WhichKey when pressing `z=` to select spelling suggestions.
|
|
||||||
'';
|
|
||||||
suggestions = defaultNullOpts.mkInt 20 ''
|
|
||||||
How many suggestions should be shown in the list?
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
presets = {
|
|
||||||
operators = defaultNullOpts.mkBool true "Adds help for operators like `d`, `y`, ...";
|
|
||||||
motions = defaultNullOpts.mkBool true "Adds help for motions.";
|
|
||||||
text_objects = defaultNullOpts.mkBool true "Help for text objects triggered after entering an operator.";
|
|
||||||
windows = defaultNullOpts.mkBool true "Default bindings on `<c-w>`.";
|
|
||||||
nav = defaultNullOpts.mkBool true "Misc bindings to work with windows.";
|
|
||||||
z = defaultNullOpts.mkBool true "Show WhichKey for folds, spelling and other bindings prefixed with `z`.";
|
|
||||||
g = defaultNullOpts.mkBool true "Show WhichKey for bindings prefixed with `g`.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
win = {
|
|
||||||
no_overlap = defaultNullOpts.mkBool true "Don't allow the popup to overlap with the cursor.";
|
|
||||||
|
|
||||||
border = defaultNullOpts.mkBorder "none" "which-key" ''
|
|
||||||
Allows configuring the border of which-key.
|
|
||||||
|
|
||||||
Supports all available border types from `vim.api.keyset.win_config.border`.
|
|
||||||
'';
|
|
||||||
|
|
||||||
padding = defaultNullOpts.mkNullable (types.listOfLen types.int 2) [
|
|
||||||
1
|
|
||||||
2
|
|
||||||
] "Extra window padding, in the form `[top/bottom, right/left]`.";
|
|
||||||
|
|
||||||
title = defaultNullOpts.mkBool true "Whether to show the title.";
|
|
||||||
|
|
||||||
title_pos = defaultNullOpts.mkStr "center" "Position of the title.";
|
|
||||||
|
|
||||||
zindex = defaultNullOpts.mkUnsignedInt 1000 "Layer depth on the popup window.";
|
|
||||||
|
|
||||||
wo = {
|
|
||||||
winblend =
|
|
||||||
defaultNullOpts.mkNullableWithRaw (types.ints.between 0 100) 0
|
|
||||||
"`0` for fully opaque and `100` for fully transparent.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
layout = {
|
|
||||||
width = {
|
|
||||||
min = defaultNullOpts.mkInt 20 "Minimum width.";
|
|
||||||
max = defaultNullOpts.mkInt null "Maximum width.";
|
|
||||||
};
|
|
||||||
|
|
||||||
spacing = defaultNullOpts.mkInt 3 "Spacing between columns.";
|
|
||||||
};
|
|
||||||
|
|
||||||
keys = {
|
|
||||||
scroll_up = defaultNullOpts.mkStr "<c-u>" "Binding to scroll up in the popup.";
|
|
||||||
scroll_down = defaultNullOpts.mkStr "<c-d>" "Binding to scroll down in the popup.";
|
|
||||||
};
|
|
||||||
|
|
||||||
sort =
|
|
||||||
defaultNullOpts.mkListOf
|
|
||||||
(types.enum [
|
|
||||||
"local"
|
|
||||||
"order"
|
|
||||||
"group"
|
|
||||||
"alphanum"
|
|
||||||
"mod"
|
|
||||||
"manual"
|
|
||||||
"case"
|
|
||||||
])
|
|
||||||
[
|
|
||||||
"local"
|
|
||||||
"order"
|
|
||||||
"group"
|
|
||||||
"alphanum"
|
|
||||||
"mod"
|
|
||||||
]
|
|
||||||
"Mappings are sorted using configured sorters and natural sort of the keys.";
|
|
||||||
|
|
||||||
expand = defaultNullOpts.mkInt 0 "Expand groups when <= n mappings.";
|
|
||||||
|
|
||||||
replace = {
|
replace = {
|
||||||
key =
|
key = defaultNullOpts.mkListOf (with types; either strLuaFn (listOf str)) (lib.nixvim.literalLua ''
|
||||||
defaultNullOpts.mkListOf (types.either types.strLuaFn (with types; listOf str))
|
|
||||||
(lib.nixvim.literalLua ''
|
|
||||||
function(key)
|
function(key)
|
||||||
return require("which-key.view").format(key)
|
return require("which-key.view").format(key)
|
||||||
end
|
end
|
||||||
'')
|
'') "Lua functions or list of strings to replace key left side key name with.";
|
||||||
"Lua functions or list of strings to replace key left side key name with.";
|
|
||||||
desc = defaultNullOpts.mkListOf (with types; listOf str) [
|
|
||||||
[
|
|
||||||
"<Plug>%(?(.*)%)?"
|
|
||||||
"%1"
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"^%+"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"<[cC]md>"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"<[cC][rR]>"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"<[sS]ilent>"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"^lua%s+"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"^call%s+"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
[
|
|
||||||
"^:%s*"
|
|
||||||
""
|
|
||||||
]
|
|
||||||
] "Lua patterns to replace right side description references with.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
icons = {
|
|
||||||
breadcrumb = defaultNullOpts.mkStr "»" "Symbol used in the command line area that shows your active key combo.";
|
|
||||||
separator = defaultNullOpts.mkStr "➜" "Symbol used between a key and its label.";
|
|
||||||
group = defaultNullOpts.mkStr "+" "Symbol prepended to a group.";
|
|
||||||
ellipsis = defaultNullOpts.mkStr "…" "Symbol used for overflow.";
|
|
||||||
mappings = defaultNullOpts.mkBool true "Set to false to disable all mapping icons.";
|
|
||||||
rules = defaultNullOpts.mkNullable (with types; either (listOf attrs) bool) [
|
|
||||||
] "Icon rules. Set to false to disable all icons.";
|
|
||||||
colors = defaultNullOpts.mkBool true ''
|
|
||||||
Use the highlights from mini.icons.
|
|
||||||
|
|
||||||
When `false`, it will use `WhichKeyIcon` instead.
|
|
||||||
'';
|
|
||||||
|
|
||||||
keys = defaultNullOpts.mkNullable types.attrs {
|
|
||||||
Up = " ";
|
|
||||||
Down = " ";
|
|
||||||
Left = " ";
|
|
||||||
Right = " ";
|
|
||||||
C = " ";
|
|
||||||
M = " ";
|
|
||||||
D = " ";
|
|
||||||
S = " ";
|
|
||||||
CR = " ";
|
|
||||||
Esc = " ";
|
|
||||||
ScrollWheelDown = " ";
|
|
||||||
ScrollWheelUp = " ";
|
|
||||||
NL = " ";
|
|
||||||
BS = "";
|
|
||||||
Space = " ";
|
|
||||||
Tab = " ";
|
|
||||||
F1 = "";
|
|
||||||
F2 = "";
|
|
||||||
F3 = "";
|
|
||||||
F4 = "";
|
|
||||||
F5 = "";
|
|
||||||
F6 = "";
|
|
||||||
F7 = "";
|
|
||||||
F8 = "";
|
|
||||||
F9 = "";
|
|
||||||
F10 = "";
|
|
||||||
F11 = "";
|
|
||||||
F12 = "";
|
|
||||||
} "Icons used by key format.";
|
|
||||||
};
|
|
||||||
|
|
||||||
show_help = defaultNullOpts.mkBool true "Show a help message in the command line for using WhichKey.";
|
|
||||||
|
|
||||||
show_keys = defaultNullOpts.mkBool true "Show the currently pressed key and its label as a message in the command line.";
|
|
||||||
|
|
||||||
disable = {
|
|
||||||
bt = defaultNullOpts.mkListOf types.str [ ] "Buftypes to disable WhichKey.";
|
|
||||||
ft = defaultNullOpts.mkListOf types.str [ ] "Filetypes to disable WhichKey.";
|
|
||||||
};
|
|
||||||
|
|
||||||
debug = defaultNullOpts.mkBool false "Enable `wk.log` in the current directory.";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
|
|
|
||||||
30
plugins/colorschemes/mini-base16.nix
Normal file
30
plugins/colorschemes/mini-base16.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-base16";
|
||||||
|
moduleName = "mini.base16";
|
||||||
|
isColorscheme = true;
|
||||||
|
colorscheme = null;
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
palette = {
|
||||||
|
base00 = "#112641";
|
||||||
|
base01 = "#3a475e";
|
||||||
|
base02 = "#606b81";
|
||||||
|
base03 = "#8691a7";
|
||||||
|
base04 = "#d5dc81";
|
||||||
|
base05 = "#e2e98f";
|
||||||
|
base06 = "#eff69c";
|
||||||
|
base07 = "#fcffaa";
|
||||||
|
base08 = "#ffcfa0";
|
||||||
|
base09 = "#cc7e46";
|
||||||
|
base0A = "#46a436";
|
||||||
|
base0B = "#9ff895";
|
||||||
|
base0C = "#ca6ecf";
|
||||||
|
base0D = "#42f7ff";
|
||||||
|
base0E = "#ffc4ff";
|
||||||
|
base0F = "#00a5c5";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
19
plugins/colorschemes/mini-hues.nix
Normal file
19
plugins/colorschemes/mini-hues.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
lib.nixvim.plugins.mkNeovimPlugin {
|
||||||
|
name = "mini-hues";
|
||||||
|
moduleName = "mini.hues";
|
||||||
|
isColorscheme = true;
|
||||||
|
colorscheme = null;
|
||||||
|
|
||||||
|
maintainers = [ lib.maintainers.HeitorAugustoLN ];
|
||||||
|
|
||||||
|
settingsExample = {
|
||||||
|
background = "#351721";
|
||||||
|
foreground = "#cdc4c6";
|
||||||
|
n_hues = 8;
|
||||||
|
saturation = "medium";
|
||||||
|
accent = "bg";
|
||||||
|
plugins.default = true;
|
||||||
|
autoadjust = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -18,6 +18,8 @@
|
||||||
./colorschemes/kanagawa.nix
|
./colorschemes/kanagawa.nix
|
||||||
./colorschemes/kanagawa-paper.nix
|
./colorschemes/kanagawa-paper.nix
|
||||||
./colorschemes/melange.nix
|
./colorschemes/melange.nix
|
||||||
|
./colorschemes/mini-base16.nix
|
||||||
|
./colorschemes/mini-hues.nix
|
||||||
./colorschemes/modus.nix
|
./colorschemes/modus.nix
|
||||||
./colorschemes/monokai-pro.nix
|
./colorschemes/monokai-pro.nix
|
||||||
./colorschemes/moonfly.nix
|
./colorschemes/moonfly.nix
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,9 @@ let
|
||||||
# https://github.com/NixOS/nixpkgs/commit/bc725b12b2595951a3f4b112d59716d30b41001a
|
# https://github.com/NixOS/nixpkgs/commit/bc725b12b2595951a3f4b112d59716d30b41001a
|
||||||
"zf"
|
"zf"
|
||||||
"zls"
|
"zls"
|
||||||
|
|
||||||
|
# luau-lsp is marked as broken on x86_64-darwin
|
||||||
|
"luau-lsp.nvim"
|
||||||
]
|
]
|
||||||
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [
|
++ lib.optionals (hostPlatform.isDarwin && hostPlatform.isAarch64) [
|
||||||
# 2025-10-20: build failure
|
# 2025-10-20: build failure
|
||||||
|
|
|
||||||
68
tests/test-sources/plugins/by-name/luau-lsp/default.nix
Normal file
68
tests/test-sources/plugins/by-name/luau-lsp/default.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.luau-lsp.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.luau-lsp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
fflags = {
|
||||||
|
enable_by_default = false;
|
||||||
|
enable_new_solver = false;
|
||||||
|
override = lib.nixvim.emptyTable;
|
||||||
|
sync = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
platform = {
|
||||||
|
type = "roblox";
|
||||||
|
};
|
||||||
|
|
||||||
|
plugin = {
|
||||||
|
enabled = false;
|
||||||
|
port = 3667;
|
||||||
|
};
|
||||||
|
|
||||||
|
server = {
|
||||||
|
path = "luau-lsp";
|
||||||
|
};
|
||||||
|
|
||||||
|
sourcemap = {
|
||||||
|
autogenerate = true;
|
||||||
|
enabled = true;
|
||||||
|
generator_cmd = lib.nixvim.mkRaw "nil";
|
||||||
|
include_non_scripts = true;
|
||||||
|
rojo_path = "rojo";
|
||||||
|
rojo_project_file = "default.project.json";
|
||||||
|
sourcemap_file = "sourcemap.json";
|
||||||
|
};
|
||||||
|
|
||||||
|
types = {
|
||||||
|
definition_files = lib.nixvim.emptyTable;
|
||||||
|
documentation_files = lib.nixvim.emptyTable;
|
||||||
|
roblox_security_level = "PluginSecurity";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
example = {
|
||||||
|
plugins.luau-lsp = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
platform.type = "roblox";
|
||||||
|
types.roblox_security_level = "PluginSecurity";
|
||||||
|
|
||||||
|
sourcemap = {
|
||||||
|
enabled = true;
|
||||||
|
autogenerate = true;
|
||||||
|
rojo_project_file = "default.project.json";
|
||||||
|
sourcemap_file = "sourcemap.json";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
tests/test-sources/plugins/by-name/mini-animate/default.nix
Normal file
18
tests/test-sources/plugins/by-name/mini-animate/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-animate.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-animate = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
cursor.enable = true;
|
||||||
|
scroll.enable = true;
|
||||||
|
resize.enable = true;
|
||||||
|
open.enable = true;
|
||||||
|
close.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
29
tests/test-sources/plugins/by-name/mini-basics/default.nix
Normal file
29
tests/test-sources/plugins/by-name/mini-basics/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-basics.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-basics = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
options = {
|
||||||
|
basic = true;
|
||||||
|
extra_ui = false;
|
||||||
|
win_borders = "auto";
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
basic = true;
|
||||||
|
option_toggle_prefix = "\\";
|
||||||
|
windows = false;
|
||||||
|
move_with_alt = false;
|
||||||
|
};
|
||||||
|
autocommands = {
|
||||||
|
basic = true;
|
||||||
|
relnum_in_visual_mode = false;
|
||||||
|
};
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-bracketed.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-bracketed = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
buffer = {
|
||||||
|
suffix = "b";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
comment = {
|
||||||
|
suffix = "c";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
conflict = {
|
||||||
|
suffix = "x";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
diagnostic = {
|
||||||
|
suffix = "d";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
file = {
|
||||||
|
suffix = "f";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
indent = {
|
||||||
|
suffix = "i";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
jump = {
|
||||||
|
suffix = "j";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
location = {
|
||||||
|
suffix = "l";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
oldfile = {
|
||||||
|
suffix = "o";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
quickfix = {
|
||||||
|
suffix = "q";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
treesitter = {
|
||||||
|
suffix = "t";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
undo = {
|
||||||
|
suffix = "u";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
suffix = "w";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
yank = {
|
||||||
|
suffix = "y";
|
||||||
|
options = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
64
tests/test-sources/plugins/by-name/mini-clue/default.nix
Normal file
64
tests/test-sources/plugins/by-name/mini-clue/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-clue.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-clue = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
triggers = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "g";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "g";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "`";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "`";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "\"";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "\"";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
keys = "z";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "x";
|
||||||
|
keys = "z";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
clues = [
|
||||||
|
(lib.nixvim.mkRaw "require(\"mini.clue\").gen_clues.builtin_completion()")
|
||||||
|
(lib.nixvim.mkRaw "require(\"mini.clue\").gen_clues.g()")
|
||||||
|
(lib.nixvim.mkRaw "require(\"mini.clue\").gen_clues.marks()")
|
||||||
|
(lib.nixvim.mkRaw "require(\"mini.clue\").gen_clues.registers()")
|
||||||
|
(lib.nixvim.mkRaw "require(\"mini.clue\").gen_clues.windows()")
|
||||||
|
(lib.nixvim.mkRaw "require(\"mini.clue\").gen_clues.z()")
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
30
tests/test-sources/plugins/by-name/mini-comment/default.nix
Normal file
30
tests/test-sources/plugins/by-name/mini-comment/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-comment.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-comment = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
options = {
|
||||||
|
custom_commentstring = lib.nixvim.mkRaw "nil";
|
||||||
|
ignore_blank_line = false;
|
||||||
|
start_of_line = false;
|
||||||
|
pad_comment_parts = true;
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
comment = "gc";
|
||||||
|
comment_line = "gcc";
|
||||||
|
comment_visual = "gc";
|
||||||
|
textobject = "gc";
|
||||||
|
};
|
||||||
|
hooks = {
|
||||||
|
pre = lib.nixvim.mkRaw "function() end";
|
||||||
|
post = lib.nixvim.mkRaw "function() end";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-completion.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-completion = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
delay = {
|
||||||
|
completion = 100;
|
||||||
|
info = 100;
|
||||||
|
signature = 50;
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
info = {
|
||||||
|
height = 25;
|
||||||
|
width = 80;
|
||||||
|
border = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
signature = {
|
||||||
|
height = 25;
|
||||||
|
width = 80;
|
||||||
|
border = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lsp_completion = {
|
||||||
|
source_func = "completefunc";
|
||||||
|
auto_setup = true;
|
||||||
|
process_items = lib.nixvim.mkRaw "nil";
|
||||||
|
snippet_insert = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
fallback_action = "<C-n>";
|
||||||
|
mappings = {
|
||||||
|
force_twostep = "<C-Space>";
|
||||||
|
force_fallback = "<A-Space>";
|
||||||
|
scroll_down = "<C-f>";
|
||||||
|
scroll_up = "<C-b>";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
42
tests/test-sources/plugins/by-name/mini-diff/default.nix
Normal file
42
tests/test-sources/plugins/by-name/mini-diff/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-diff.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-diff = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
view = {
|
||||||
|
style = lib.nixvim.mkRaw "vim.go.number and 'number' or 'sign'";
|
||||||
|
signs = {
|
||||||
|
add = "▒";
|
||||||
|
change = "▒";
|
||||||
|
delete = "▒";
|
||||||
|
};
|
||||||
|
priority = 199;
|
||||||
|
};
|
||||||
|
source = lib.nixvim.mkRaw "nil";
|
||||||
|
delay = {
|
||||||
|
text_change = 200;
|
||||||
|
};
|
||||||
|
mappings = {
|
||||||
|
apply = "gh";
|
||||||
|
reset = "gH";
|
||||||
|
textobject = "gh";
|
||||||
|
goto_first = "[H";
|
||||||
|
goto_prev = "[h";
|
||||||
|
goto_next = "]h";
|
||||||
|
goto_last = "]H";
|
||||||
|
};
|
||||||
|
options = {
|
||||||
|
algorithm = "histogram";
|
||||||
|
indent_heuristic = true;
|
||||||
|
linematch = 60;
|
||||||
|
wrap_goto = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
tests/test-sources/plugins/by-name/mini-doc/default.nix
Normal file
17
tests/test-sources/plugins/by-name/mini-doc/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-doc.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-doc = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
annotation_pattern = "^%-%-%-(%S*) ?";
|
||||||
|
default_section_id = "@text";
|
||||||
|
script_path = "scripts/minidoc.lua";
|
||||||
|
silent = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
49
tests/test-sources/plugins/by-name/mini-files/default.nix
Normal file
49
tests/test-sources/plugins/by-name/mini-files/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-files.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-files = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
content = {
|
||||||
|
filter = lib.nixvim.mkRaw "nil";
|
||||||
|
highlight = lib.nixvim.mkRaw "nil";
|
||||||
|
prefix = lib.nixvim.mkRaw "nil";
|
||||||
|
sort = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
close = "q";
|
||||||
|
go_in = "l";
|
||||||
|
go_in_plus = "L";
|
||||||
|
go_out = "h";
|
||||||
|
go_out_plus = "H";
|
||||||
|
mark_goto = "'";
|
||||||
|
mark_set = "m";
|
||||||
|
reset = "<BS>";
|
||||||
|
reveal_cwd = "@";
|
||||||
|
show_help = "g?";
|
||||||
|
synchronize = "=";
|
||||||
|
trim_left = "<";
|
||||||
|
trim_right = ">";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
permanent_delete = true;
|
||||||
|
use_as_default_explorer = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
windows = {
|
||||||
|
max_number = lib.nixvim.mkRaw "math.huge";
|
||||||
|
preview = false;
|
||||||
|
width_focus = 50;
|
||||||
|
width_nofocus = 15;
|
||||||
|
width_preview = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-hipatterns.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-hipatterns = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
highlighters = lib.nixvim.emptyTable;
|
||||||
|
|
||||||
|
delay = {
|
||||||
|
text_change = 200;
|
||||||
|
scroll = 50;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-indentscope.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-indentscope = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
draw = {
|
||||||
|
delay = 100;
|
||||||
|
predicate = lib.nixvim.mkRaw "function (scope) return not scope.body.is_incomplete end";
|
||||||
|
priority = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
object_scope = "ii";
|
||||||
|
object_scope_with_border = "ai";
|
||||||
|
goto_top = "[i";
|
||||||
|
goto_bottom = "]i";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
border = "both";
|
||||||
|
indent_at_cursor = true;
|
||||||
|
n_lines = 10000;
|
||||||
|
try_as_border = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
symbol = "╎";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
tests/test-sources/plugins/by-name/mini-jump/default.nix
Normal file
27
tests/test-sources/plugins/by-name/mini-jump/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-jump.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-jump = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mappings = {
|
||||||
|
forward = "f";
|
||||||
|
backward = "F";
|
||||||
|
forward_till = "t";
|
||||||
|
backward_till = "T";
|
||||||
|
repeat_jump = ";";
|
||||||
|
};
|
||||||
|
|
||||||
|
delay = {
|
||||||
|
highlight = 250;
|
||||||
|
idle_stop = 10000000;
|
||||||
|
};
|
||||||
|
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
45
tests/test-sources/plugins/by-name/mini-jump2d/default.nix
Normal file
45
tests/test-sources/plugins/by-name/mini-jump2d/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-jump2d.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-jump2d = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
spotter = lib.nixvim.mkRaw "nil";
|
||||||
|
labels = "abcdefghijklmnopqrstuvwxyz";
|
||||||
|
|
||||||
|
view = {
|
||||||
|
dim = false;
|
||||||
|
n_steps_ahead = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
allowed_lines = {
|
||||||
|
blank = true;
|
||||||
|
cursor_before = true;
|
||||||
|
cursor_at = true;
|
||||||
|
cursor_after = true;
|
||||||
|
fold = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
allowed_windows = {
|
||||||
|
current = true;
|
||||||
|
not_current = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hooks = {
|
||||||
|
before_start = lib.nixvim.mkRaw "nil";
|
||||||
|
after_jump = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
start_jumping = "<CR>";
|
||||||
|
};
|
||||||
|
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
30
tests/test-sources/plugins/by-name/mini-map/default.nix
Normal file
30
tests/test-sources/plugins/by-name/mini-map/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-map.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-map = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
integrations = lib.nixvim.mkRaw "nil";
|
||||||
|
|
||||||
|
symbols = {
|
||||||
|
encode = lib.nixvim.mkRaw "nil";
|
||||||
|
scroll_line = "█";
|
||||||
|
scroll_view = "┃";
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
focusable = false;
|
||||||
|
side = "right";
|
||||||
|
show_integration_count = true;
|
||||||
|
width = 10;
|
||||||
|
winblend = 25;
|
||||||
|
zindex = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
17
tests/test-sources/plugins/by-name/mini-misc/default.nix
Normal file
17
tests/test-sources/plugins/by-name/mini-misc/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-misc.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-misc = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
make_global = [
|
||||||
|
"put"
|
||||||
|
"put_text"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
28
tests/test-sources/plugins/by-name/mini-move/default.nix
Normal file
28
tests/test-sources/plugins/by-name/mini-move/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-move.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-move = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mappings = {
|
||||||
|
left = "<M-h>";
|
||||||
|
right = "<M-l>";
|
||||||
|
down = "<M-j>";
|
||||||
|
up = "<M-k>";
|
||||||
|
|
||||||
|
line_left = "<M-h>";
|
||||||
|
line_right = "<M-l>";
|
||||||
|
line_down = "<M-j>";
|
||||||
|
line_up = "<M-k>";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
reindent_linewise = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
30
tests/test-sources/plugins/by-name/mini-notify/default.nix
Normal file
30
tests/test-sources/plugins/by-name/mini-notify/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-notify.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-notify = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
content = {
|
||||||
|
format = lib.nixvim.mkRaw "nil";
|
||||||
|
sort = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
lsp_progress = {
|
||||||
|
enable = true;
|
||||||
|
level = "INFO";
|
||||||
|
duration_last = 1000;
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
config = lib.nixvim.emptyTable;
|
||||||
|
max_width_share = 0.382;
|
||||||
|
winblend = 25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-operators.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-operators = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
evaluate = {
|
||||||
|
prefix = "g=";
|
||||||
|
func = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
exchange = {
|
||||||
|
prefix = "gx";
|
||||||
|
reindent_linewise = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
multiply = {
|
||||||
|
prefix = "gm";
|
||||||
|
func = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
replace = {
|
||||||
|
prefix = "gr";
|
||||||
|
reindent_linewise = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
sort = {
|
||||||
|
prefix = "gs";
|
||||||
|
func = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
69
tests/test-sources/plugins/by-name/mini-pick/default.nix
Normal file
69
tests/test-sources/plugins/by-name/mini-pick/default.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-pick.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-pick = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
delay = {
|
||||||
|
async = 10;
|
||||||
|
busy = 50;
|
||||||
|
};
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
caret_left = "<Left>";
|
||||||
|
caret_right = "<Right>";
|
||||||
|
choose = "<CR>";
|
||||||
|
choose_in_split = "<C-s>";
|
||||||
|
choose_in_tabpage = "<C-t>";
|
||||||
|
choose_in_vsplit = "<C-v>";
|
||||||
|
choose_marked = "<M-CR>";
|
||||||
|
delete_char = "<BS>";
|
||||||
|
delete_char_right = "<Del>";
|
||||||
|
delete_left = "<C-u>";
|
||||||
|
delete_word = "<C-w>";
|
||||||
|
mark = "<C-x>";
|
||||||
|
mark_all = "<C-a>";
|
||||||
|
move_down = "<C-n>";
|
||||||
|
move_start = "<C-g>";
|
||||||
|
move_up = "<C-p>";
|
||||||
|
paste = "<C-r>";
|
||||||
|
refine = "<C-Space>";
|
||||||
|
refine_marked = "<M-Space>";
|
||||||
|
scroll_down = "<C-f>";
|
||||||
|
scroll_left = "<C-h>";
|
||||||
|
scroll_right = "<C-l>";
|
||||||
|
scroll_up = "<C-b>";
|
||||||
|
stop = "<Esc>";
|
||||||
|
toggle_info = "<S-Tab>";
|
||||||
|
toggle_preview = "<Tab>";
|
||||||
|
};
|
||||||
|
|
||||||
|
options = {
|
||||||
|
content_from_bottom = false;
|
||||||
|
use_cache = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
source = {
|
||||||
|
items = lib.nixvim.mkRaw "nil";
|
||||||
|
name = lib.nixvim.mkRaw "nil";
|
||||||
|
cwd = lib.nixvim.mkRaw "nil";
|
||||||
|
match = lib.nixvim.mkRaw "nil";
|
||||||
|
show = lib.nixvim.mkRaw "nil";
|
||||||
|
preview = lib.nixvim.mkRaw "nil";
|
||||||
|
choose = lib.nixvim.mkRaw "nil";
|
||||||
|
choose_marked = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
config = lib.nixvim.mkRaw "nil";
|
||||||
|
prompt_caret = "▏";
|
||||||
|
prompt_prefix = "> ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
43
tests/test-sources/plugins/by-name/mini-sessions/default.nix
Normal file
43
tests/test-sources/plugins/by-name/mini-sessions/default.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-sessions.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-sessions = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
autoread = false;
|
||||||
|
autowrite = true;
|
||||||
|
file = "Session.vim";
|
||||||
|
|
||||||
|
force = {
|
||||||
|
read = false;
|
||||||
|
write = true;
|
||||||
|
delete = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
hooks = {
|
||||||
|
pre = {
|
||||||
|
read = lib.nixvim.mkRaw "nil";
|
||||||
|
write = lib.nixvim.mkRaw "nil";
|
||||||
|
delete = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
post = {
|
||||||
|
read = lib.nixvim.mkRaw "nil";
|
||||||
|
write = lib.nixvim.mkRaw "nil";
|
||||||
|
delete = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
verbose = {
|
||||||
|
read = false;
|
||||||
|
write = true;
|
||||||
|
delete = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
29
tests/test-sources/plugins/by-name/mini-snippets/default.nix
Normal file
29
tests/test-sources/plugins/by-name/mini-snippets/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-snippets.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-snippets = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
snippets = lib.nixvim.emptyTable;
|
||||||
|
|
||||||
|
mappings = {
|
||||||
|
expand = "<C-j>";
|
||||||
|
jump_next = "<C-l>";
|
||||||
|
jump_prev = "<C-h>";
|
||||||
|
stop = "<C-c>";
|
||||||
|
};
|
||||||
|
|
||||||
|
expand = {
|
||||||
|
prepare = lib.nixvim.mkRaw "nil";
|
||||||
|
match = lib.nixvim.mkRaw "nil";
|
||||||
|
select = lib.nixvim.mkRaw "nil";
|
||||||
|
insert = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-splitjoin.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-splitjoin = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mappings = {
|
||||||
|
toggle = "gS";
|
||||||
|
split = "";
|
||||||
|
join = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
detect = {
|
||||||
|
brackets = lib.nixvim.mkRaw "nil";
|
||||||
|
separator = ",";
|
||||||
|
exclude_regions = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
split = {
|
||||||
|
hooks_pre = lib.nixvim.emptyTable;
|
||||||
|
hooks_post = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
|
||||||
|
join = {
|
||||||
|
hooks_pre = lib.nixvim.emptyTable;
|
||||||
|
hooks_post = lib.nixvim.emptyTable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
tests/test-sources/plugins/by-name/mini-test/default.nix
Normal file
31
tests/test-sources/plugins/by-name/mini-test/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-test.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-test = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
collect = {
|
||||||
|
emulate_busted = true;
|
||||||
|
find_files = lib.nixvim.mkRaw ''
|
||||||
|
function()
|
||||||
|
return vim.fn.globpath('tests', '**/test_*.lua', true, true)
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
filter_cases = lib.nixvim.mkRaw "function(case) return true end";
|
||||||
|
};
|
||||||
|
|
||||||
|
execute = {
|
||||||
|
reporter = lib.nixvim.mkRaw "nil";
|
||||||
|
stop_on_error = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
script_path = "scripts/minitest.lua";
|
||||||
|
silent = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
31
tests/test-sources/plugins/by-name/mini-visits/default.nix
Normal file
31
tests/test-sources/plugins/by-name/mini-visits/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
empty = {
|
||||||
|
plugins.mini-visits.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
defaults = {
|
||||||
|
plugins.mini-visits = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
list = {
|
||||||
|
filter = lib.nixvim.mkRaw "nil";
|
||||||
|
sort = lib.nixvim.mkRaw "nil";
|
||||||
|
};
|
||||||
|
|
||||||
|
silent = false;
|
||||||
|
|
||||||
|
store = {
|
||||||
|
autowrite = true;
|
||||||
|
normalize = lib.nixvim.mkRaw "nil";
|
||||||
|
path = lib.nixvim.mkRaw "vim.fn.stdpath('data') .. '/mini-visits-index'";
|
||||||
|
};
|
||||||
|
|
||||||
|
track = {
|
||||||
|
event = "BufEnter";
|
||||||
|
delay = 1000;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
tests/test-sources/plugins/colorschemes/mini-base16.nix
Normal file
27
tests/test-sources/plugins/colorschemes/mini-base16.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
defaults = {
|
||||||
|
colorschemes.mini-base16 = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
palette = {
|
||||||
|
base00 = "#112641";
|
||||||
|
base01 = "#3a475e";
|
||||||
|
base02 = "#606b81";
|
||||||
|
base03 = "#8691a7";
|
||||||
|
base04 = "#d5dc81";
|
||||||
|
base05 = "#e2e98f";
|
||||||
|
base06 = "#eff69c";
|
||||||
|
base07 = "#fcffaa";
|
||||||
|
base08 = "#ffcfa0";
|
||||||
|
base09 = "#cc7e46";
|
||||||
|
base0A = "#46a436";
|
||||||
|
base0B = "#9ff895";
|
||||||
|
base0C = "#ca6ecf";
|
||||||
|
base0D = "#42f7ff";
|
||||||
|
base0E = "#ffc4ff";
|
||||||
|
base0F = "#00a5c5";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
tests/test-sources/plugins/colorschemes/mini-hues.nix
Normal file
16
tests/test-sources/plugins/colorschemes/mini-hues.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
defaults = {
|
||||||
|
colorschemes.mini-hues = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
background = "#351721";
|
||||||
|
foreground = "#cdc4c6";
|
||||||
|
n_hues = 8;
|
||||||
|
saturation = "medium";
|
||||||
|
accent = "bg";
|
||||||
|
plugins.default = true;
|
||||||
|
autoadjust = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue