Skip to content

Commit

Permalink
refactor(config): move mini plugin configuration to separate file
Browse files Browse the repository at this point in the history
- Extract mini plugin configuration into dedicated mini.nix file
- Add starter module configuration with custom header and sections
- Remove mini plugin config from codecompanion.nix
  • Loading branch information
simonwjackson committed Jan 28, 2025
1 parent cd500c8 commit ac93bc4
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
5 changes: 0 additions & 5 deletions config/ai/codecompanion.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@
enable = true;
};

plugins.mini = {
enable = true;
modules.diff.options.view.style = "sign";
};

plugins.blink-cmp = {
enable = true;
settings = {
Expand Down
3 changes: 3 additions & 0 deletions config/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

./clipboard.nix
./color.nix
./mini.nix
./conform.nix
./dadbod.nix
./flash.nix
Expand Down Expand Up @@ -270,6 +271,8 @@
extraConfigLua = ''
local opt = vim.opt
opt.shortmess:append('I')
-- Persist undo history between sessions
opt.undofile = true;
Expand Down
39 changes: 39 additions & 0 deletions config/mini.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
plugins.mini = {
enable = true;
modules.diff.options.view.style = "sign";
modules.starter = {
content_hooks = {
"__unkeyed-1.adding_bullet" = {
__raw = "require('mini.starter').gen_hook.adding_bullet()";
};
"__unkeyed-2.indexing" = {
__raw = "require('mini.starter').gen_hook.indexing('all', { 'Builtin actions' })";
};
"__unkeyed-3.padding" = {
__raw = "require('mini.starter').gen_hook.aligning('center', 'center')";
};
};
evaluate_single = true;
header = ''
▀█▀ █▀▀ █ █ █▀█
█ █ █▀█ █ █
▀▀▀ ▀▀▀ ▀ ▀ ▀▀▀
'';
items = {
"__unkeyed-1.buildtin_actions" = {
__raw = "require('mini.starter').sections.builtin_actions()";
};
"__unkeyed-2.recent_files_current_directory" = {
__raw = "require('mini.starter').sections.recent_files(10, false)";
};
"__unkeyed-3.recent_files" = {
__raw = "require('mini.starter').sections.recent_files(10, true)";
};
"__unkeyed-4.sessions" = {
__raw = "require('mini.starter').sections.sessions(5, true)";
};
};
};
};
}

0 comments on commit ac93bc4

Please sign in to comment.