nixvim-for-share/config/plugins/mini.nix
2025-07-26 12:43:01 +00:00

75 lines
3.3 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ helpers, ... }:
let
inherit (helpers) mkRaw;
in
{
# evaluation warning: Nixvim: `plugins.web-devicons` was enabled automatically because the following plugins are enabled.
# This behaviour is deprecated. Please explicitly define `plugins.web-devicons.enable` or alternatively
# enable `plugins.mini.enable` with `plugins.mini.modules.icons` and `plugins.mini.mockDevIcons`.
# plugins.telescope
# plugins.nvim-tree
# plugins.bufferline
plugins = {
mini = {
enable = true;
# https://nix-community.github.io/nixvim/plugins/mini/index.html
modules.icons = {
ai = {
n_lines = 50;
search_method = "cover_or_next";
};
comment = {
mappings = {
comment = "<leader>/";
comment_line = "<leader>/";
comment_visual = "<leader>/";
textobject = "<leader>/";
};
};
diff = {
view = {
style = "sign";
};
};
starter = {
content_hooks = {
"__unkeyed-1.adding_bullet" = mkRaw "require('mini.starter').gen_hook.adding_bullet()";
"__unkeyed-2.indexing" =
mkRaw "require('mini.starter').gen_hook.indexing('all', { 'Builtin actions' })";
"__unkeyed-3.padding" = mkRaw "require('mini.starter').gen_hook.aligning('center', 'center')";
};
evaluate_single = true;
header = ''
'';
items = {
"__unkeyed-1.buildtin_actions" = mkRaw "require('mini.starter').sections.builtin_actions()";
"__unkeyed-2.recent_files_current_directory" =
mkRaw "require('mini.starter').sections.recent_files(10, false)";
"__unkeyed-3.recent_files" = mkRaw "require('mini.starter').sections.recent_files(10, true)";
"__unkeyed-4.sessions" = mkRaw "require('mini.starter').sections.sessions(5, true)";
};
};
surround = {
mappings = {
add = "gsa";
delete = "gsd";
find = "gsf";
find_left = "gsF";
highlight = "gsh";
replace = "gsr";
update_n_lines = "gsn";
};
};
};
# https://nix-community.github.io/nixvim/plugins/mini/index.html
# Whether to tell mini.icons to emulate nvim-web-devicons for plugins that dont natively support it.
# When enabled, you dont need to set plugins.web-devicons.enable. This will replace the need for it.
mockDevIcons = true;
};
};
}