mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-26 10:48:35 +02:00
plugins/utils: normalize plugin defaults
This commit is contained in:
parent
b10a391bd0
commit
6ab2a39e6a
53 changed files with 1434 additions and 1221 deletions
|
@ -12,10 +12,9 @@ with lib;
|
|||
|
||||
package = helpers.mkPluginPackageOption "persistence.nvim" pkgs.vimPlugins.persistence-nvim;
|
||||
|
||||
dir =
|
||||
helpers.defaultNullOpts.mkNullable (with types; either str helpers.nixvimTypes.rawLua)
|
||||
''vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/")''
|
||||
"directory where session files are saved";
|
||||
dir = helpers.defaultNullOpts.mkStr {
|
||||
__raw = ''vim.fn.expand(vim.fn.stdpath("state") .. "/sessions/")'';
|
||||
} "directory where session files are saved";
|
||||
|
||||
options =
|
||||
let
|
||||
|
@ -38,9 +37,13 @@ with lib;
|
|||
"winsize"
|
||||
];
|
||||
in
|
||||
helpers.defaultNullOpts.mkNullable (
|
||||
with types; listOf (enum sessionOpts)
|
||||
) ''["buffers" "curdir" "tabpages" "winsize" "skiprtp"]'' "sessionoptions used for saving";
|
||||
helpers.defaultNullOpts.mkListOf (types.enum sessionOpts) [
|
||||
"buffers"
|
||||
"curdir"
|
||||
"tabpages"
|
||||
"winsize"
|
||||
"skiprtp"
|
||||
] "sessionoptions used for saving";
|
||||
|
||||
preSave = helpers.defaultNullOpts.mkLuaFn "nil" "a function to call before saving the session";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue