Skip to content

Commit

Permalink
plugins/startify: switch to settings option
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Mar 12, 2024
1 parent a5b7ff5 commit b9a2628
Show file tree
Hide file tree
Showing 4 changed files with 511 additions and 238 deletions.
2 changes: 1 addition & 1 deletion plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
./utils/smart-splits.nix
./utils/specs.nix
./utils/spider.nix
./utils/startify.nix
./utils/startify
./utils/startup.nix
./utils/surround.nix
./utils/tmux-navigator.nix
Expand Down
237 changes: 0 additions & 237 deletions plugins/utils/startify.nix

This file was deleted.

104 changes: 104 additions & 0 deletions plugins/utils/startify/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
lib,
config,
helpers,
pkgs,
...
}:
with lib;
with helpers.vim-plugin;
mkVimPlugin config {
name = "startify";
originalName = "vim-startify";
defaultPackage = pkgs.vimPlugins.vim-startify;
globalPrefix = "startify_";

maintainers = [maintainers.GaetanLepage];

# TODO introduced 2024-03-01: remove 2024-05-01
deprecateExtraConfig = true;
optionsRenamedToSettings = [
"sessionDir"
"lists"
"bookmarks"
"commands"
"filesNumber"
"sessionAutoload"
"sessionBeforeSave"
"sessionPersistence"
"sessionDeleteBuffers"
"changeToDir"
"changeToVcsRoot"
"changeCmd"
"paddingLeft"
"enableSpecial"
"enableUnsafe"
"sessionRemoveLines"
"sessionNumber"
"sessionSort"
"customIndices"
"customHeader"
"customFooter"
"relativePath"
"useEnv"
];
imports =
map
(
option:
mkRenamedOptionModule
["plugins" "startify" option.old]
["plugins" "startify" "settings" option.new]
)
[
{
old = "updateOldFiles";
new = "update_oldfiles";
}
{
old = "skipList";
new = "skiplist";
}
{
old = "useUnicode";
new = "fortune_use_unicode";
}
{
old = "skipListServer";
new = "skiplist_server";
}
{
old = "sessionSaveVars";
new = "session_savevars";
}
{
old = "sessionCmds";
new = "session_savecmds";
}
{
old = "customQuotes";
new = "custom_header_quotes";
}
{
old = "disableAtVimEnter";
new = "disable_at_vimenter";
}
];

settingsOptions = import ./options.nix {inherit lib helpers;};

# TODO
settingsExample = {
custom_header = [
""
" ███╗ ██╗██╗██╗ ██╗██╗ ██╗██╗███╗ ███╗"
" ████╗ ██║██║╚██╗██╔╝██║ ██║██║████╗ ████║"
" ██╔██╗ ██║██║ ╚███╔╝ ██║ ██║██║██╔████╔██║"
" ██║╚██╗██║██║ ██╔██╗ ╚██╗ ██╔╝██║██║╚██╔╝██║"
" ██║ ╚████║██║██╔╝ ██╗ ╚████╔╝ ██║██║ ╚═╝ ██║"
" ╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝ ╚═══╝ ╚═╝╚═╝ ╚═╝"
];
change_to_dir = false;
fortune_use_unicode = true;
};
}
Loading

0 comments on commit b9a2628

Please sign in to comment.