mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-05 18:01:32 +00:00
modules: fix typos; clean up vim-startify module
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69641dac96714f7d7ddfb6a302e7340de9ca
This commit is contained in:
parent
085df81edf
commit
fa52e006eb
2 changed files with 52 additions and 36 deletions
|
@ -3,46 +3,47 @@
|
||||||
inherit (lib.types) listOf attrs bool enum str oneOf int;
|
inherit (lib.types) listOf attrs bool enum str oneOf int;
|
||||||
in {
|
in {
|
||||||
options.vim.dashboard.startify = {
|
options.vim.dashboard.startify = {
|
||||||
enable = mkEnableOption "dashboard via vim-startify";
|
enable = mkEnableOption "fancy start screen for Vim [vim-startify]";
|
||||||
|
|
||||||
bookmarks = mkOption {
|
bookmarks = mkOption {
|
||||||
default = [];
|
|
||||||
description = ''List of book marks to disaply on start page'';
|
|
||||||
type = listOf attrs;
|
type = listOf attrs;
|
||||||
|
default = [];
|
||||||
example = {"c" = "~/.vimrc";};
|
example = {"c" = "~/.vimrc";};
|
||||||
|
description = "List of book marks to display on start page";
|
||||||
};
|
};
|
||||||
|
|
||||||
changeToDir = mkOption {
|
changeToDir = mkOption {
|
||||||
default = true;
|
|
||||||
description = "Should vim change to the directory of the file you open";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = "Whether Vim should change to the directory of the file you open";
|
||||||
};
|
};
|
||||||
|
|
||||||
changeToVCRoot = mkOption {
|
changeToVCRoot = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Should vim change to the version control root when opening a file";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether Vim should change to the version control root when opening a file";
|
||||||
};
|
};
|
||||||
|
|
||||||
changeDirCmd = mkOption {
|
changeDirCmd = mkOption {
|
||||||
default = "lcd";
|
|
||||||
description = "Command to change the current window with. Can be cd, lcd or tcd";
|
|
||||||
type = enum ["cd" "lcd" "tcd"];
|
type = enum ["cd" "lcd" "tcd"];
|
||||||
|
default = "lcd";
|
||||||
|
description = "Command to change the current window with.";
|
||||||
};
|
};
|
||||||
|
|
||||||
customHeader = mkOption {
|
customHeader = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Text to place in the header";
|
description = "Text to place in the header";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
customFooter = mkOption {
|
customFooter = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Text to place in the footer";
|
description = "Text to place in the footer";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lists = mkOption {
|
lists = mkOption {
|
||||||
|
type = listOf attrs;
|
||||||
default = [
|
default = [
|
||||||
{
|
{
|
||||||
type = "files";
|
type = "files";
|
||||||
|
@ -66,121 +67,136 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
description = "Specify the lists and in what order they are displayed on startify.";
|
description = "Specify the lists and in what order they are displayed on startify.";
|
||||||
type = listOf attrs;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
skipList = mkOption {
|
skipList = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of regex patterns to exclude from MRU lists";
|
description = "List of regex patterns to exclude from MRU lists";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
updateOldFiles = mkOption {
|
updateOldFiles = mkOption {
|
||||||
|
type = bool;
|
||||||
|
|
||||||
default = false;
|
default = false;
|
||||||
description = "Set if you want startify to always update and not just when neovim closes";
|
description = "Set if you want startify to always update and not just when neovim closes";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionAutoload = mkOption {
|
sessionAutoload = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Make startify auto load Session.vim files from the current directory";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
|
||||||
|
default = false;
|
||||||
|
description = "Make vim-startify auto load Session.vim files from the current directory";
|
||||||
};
|
};
|
||||||
|
|
||||||
commands = mkOption {
|
commands = mkOption {
|
||||||
|
type = listOf (oneOf [str attrs (listOf str)]);
|
||||||
default = [];
|
default = [];
|
||||||
description = "Commands that are presented to the user on startify page";
|
description = "Commands that are presented to the user on startify page";
|
||||||
type = listOf (oneOf [str attrs (listOf str)]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
filesNumber = mkOption {
|
filesNumber = mkOption {
|
||||||
|
type = int;
|
||||||
default = 10;
|
default = 10;
|
||||||
description = "How many files to list";
|
description = "How many files to list";
|
||||||
type = int;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
customIndices = mkOption {
|
customIndices = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Specify a list of default characters to use instead of numbers";
|
description = "Specify a list of default characters to use instead of numbers";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
disableOnStartup = mkOption {
|
disableOnStartup = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Prevent startify from opening on startup but can be called with :Startify";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether vim-startify should be disabled on startup.
|
||||||
|
|
||||||
|
This will prevent startify from opening on startup, but it can still
|
||||||
|
be called with `:Startify`
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
unsafe = mkOption {
|
unsafe = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Turns on unsafe mode for Startify. Stops resolving links, checking files are readable and filtering bookmark list";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to turn on unsafe mode for Startify.
|
||||||
|
|
||||||
|
While enabld, vim-startify will stops resolving links, checking files
|
||||||
|
are readable and filtering bookmark list
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
paddingLeft = mkOption {
|
paddingLeft = mkOption {
|
||||||
|
type = int;
|
||||||
default = 3;
|
default = 3;
|
||||||
description = "Number of spaces used for left padding.";
|
description = "Number of spaces used for left padding.";
|
||||||
type = int;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEnv = mkOption {
|
useEnv = mkOption {
|
||||||
|
type = bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Show environment variables in path if name is shorter than value";
|
description = "Show environment variables in path if name is shorter than value";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionBeforeSave = mkOption {
|
sessionBeforeSave = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Commands to run before saving a session";
|
description = "Commands to run before saving a session";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionPersistence = mkOption {
|
sessionPersistence = mkOption {
|
||||||
|
type = bool;
|
||||||
default = false;
|
default = false;
|
||||||
description = "Persist session before leaving vim or switching session";
|
description = "Persist session before leaving vim or switching session";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionDeleteBuffers = mkOption {
|
sessionDeleteBuffers = mkOption {
|
||||||
|
type = bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "Delete all buffers when loading or closing a session";
|
description = "Delete all buffers when loading or closing a session";
|
||||||
type = bool;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionDir = mkOption {
|
sessionDir = mkOption {
|
||||||
|
type = str;
|
||||||
default = "~/.vim/session";
|
default = "~/.vim/session";
|
||||||
description = "Directory to save and load sessions from";
|
description = "Directory to save and load sessions from";
|
||||||
type = str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
skipListServer = mkOption {
|
skipListServer = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of vim servers to not load startify for";
|
description = "List of vim servers to not load startify for";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionRemoveLines = mkOption {
|
sessionRemoveLines = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "Patterns to remove from session files";
|
description = "Patterns to remove from session files";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionSavevars = mkOption {
|
sessionSavevars = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of variables to save into a session file.";
|
description = "List of variables to save into a session file.";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionSavecmds = mkOption {
|
sessionSavecmds = mkOption {
|
||||||
|
type = listOf str;
|
||||||
default = [];
|
default = [];
|
||||||
description = "List of commands to run when loading a session.";
|
description = "List of commands to run when loading a session.";
|
||||||
type = listOf str;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionSort = mkOption {
|
sessionSort = mkOption {
|
||||||
default = false;
|
|
||||||
description = "Set if you want items sorted by date rather than alphabetically";
|
|
||||||
type = bool;
|
type = bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
While true, sessions will be sorted by date rather than alphabetically.
|
||||||
|
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,7 @@ in {
|
||||||
# Absolute path, as a string. This is the impure option.
|
# Absolute path, as a string. This is the impure option.
|
||||||
"$HOME/.config/nvim-extra"
|
"$HOME/.config/nvim-extra"
|
||||||
|
|
||||||
# Relative path inside your configurationn. If your config
|
# Relative path inside your configuration. If your config
|
||||||
# is version controlled, then this is pure and reproducible.
|
# is version controlled, then this is pure and reproducible.
|
||||||
./nvim
|
./nvim
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue