Skip to content

Commit

Permalink
fix(nvimtree): errors in refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
horriblename committed Mar 16, 2024
1 parent 063526a commit cdc483c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion lib/lua.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ in rec {
(filterAttrs
(
_: v:
(v != null) && (toLuaObject v != "{}")
#(v != null) && (toLuaObject v != "{}")
true
)
args)))
+ "}"
Expand Down
18 changes: 11 additions & 7 deletions modules/filetree/nvimtree/nvimtree.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
...
}: let
inherit (lib) mkEnableOption mkOption literalExpression;
inherit (lib.generators) mkLuaInline;
inherit (lib.types) nullOr str bool int submodule listOf enum oneOf attrs addCheck;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
Expand Down Expand Up @@ -46,7 +47,7 @@ in {
type = bool;
};

autoreload_on_write = mkOption {
auto_reload_on_write = mkOption {
default = true;
description = "Auto reload tree on write";
type = bool;
Expand Down Expand Up @@ -146,7 +147,7 @@ in {
'';
};

reload_on_buf_enter = mkOption {
reload_on_bufenter = mkOption {
default = false;
type = bool;
description = "Automatically reloads the tree on `BufEnter` nvim-tree.";
Expand Down Expand Up @@ -266,12 +267,14 @@ in {
description = "Minimum severity.";
type = enum ["HINT" "INFO" "WARNING" "ERROR"];
default = "HINT";
apply = x: mkLuaInline "vim.diagnostic.severity.${x}";
};

max = mkOption {
description = "Maximum severity.";
type = enum ["HINT" "INFO" "WARNING" "ERROR"];
default = "ERROR";
apply = x: mkLuaInline "vim.diagnostic.severity.${x}";
};
};
};
Expand Down Expand Up @@ -372,7 +375,7 @@ in {
};
};

selectPrompts = mkEnableOption ''
select_prompts = mkEnableOption ''
Use `vim.ui.select` style prompts. Necessary when using a UI prompt decorator such as dressing.nvim or telescope-ui-select.nvim
'';

Expand Down Expand Up @@ -713,12 +716,12 @@ in {
default = {
default = "";
open = "";
arrowOpen = "";
arrowClosed = "";
arrow_open = "";
arrow_closed = "";
empty = "";
emptyOpen = "";
empty_open = "";
symlink = "";
symlinkOpen = "";
symlink_open = "";
};
};

Expand Down Expand Up @@ -1066,6 +1069,7 @@ in {
type = enum ["ERROR" "WARNING" "INFO" "DEBUG"];
description = "Specify minimum notification level, uses the values from `vim.log.levels`";
default = "INFO";
apply = x: mkLuaInline "vim.log.levels.${x}";
};

absolute_path = mkOption {
Expand Down

0 comments on commit cdc483c

Please sign in to comment.