mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
session/nvim-session-manager: fix autoload_mode type
Fixes `Error detected while processing VimEnter Autocommands for "*"` by using an enum type for "autoload_mode" instead of a string
This commit is contained in:
parent
f24189f1d2
commit
d12846211b
2 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.types) nullOr str bool;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib) mkEnableOption mkOption types mkRenamedOptionModule;
|
||||
in {
|
||||
imports = let
|
||||
|
@ -68,6 +69,8 @@ in {
|
|||
|
||||
autoload_mode = mkOption {
|
||||
type = types.enum ["Disabled" "CurrentDir" "LastSession"];
|
||||
# variable `sm` referenced from ./config.nix
|
||||
apply = value: mkLuaInline "sm.AutoloadMode.${value}";
|
||||
default = "LastSession";
|
||||
description = "Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue