diff --git a/.luacheckrc b/.luacheckrc index 92d06f7b..d37661a7 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -8,6 +8,6 @@ ignore = { } -- Global objects defined by the C code -read_globals = { +globals = { "vim", } diff --git a/lua/nvim-tree/lib.lua b/lua/nvim-tree/lib.lua index 3322ff3a..7a74182e 100644 --- a/lua/nvim-tree/lib.lua +++ b/lua/nvim-tree/lib.lua @@ -462,7 +462,8 @@ function M.sibling(node, direction) local iter = get_line_from_node(node, true) local node_path = node.absolute_path - local line, parent = 0, nil + local line = 0 + local parent, _ -- Check if current node is already at root entries for index, entry in ipairs(M.Tree.entries) do diff --git a/lua/nvim-tree/renderer.lua b/lua/nvim-tree/renderer.lua index 7bb0a029..49de29c0 100644 --- a/lua/nvim-tree/renderer.lua +++ b/lua/nvim-tree/renderer.lua @@ -26,7 +26,7 @@ local icon_padding = vim.g.nvim_tree_icon_padding or " " if icon_state.show_folder_icon then get_folder_icon = function(open, is_symlink, has_children) - local n = "" + local n if is_symlink and open then n = icon_state.icons.folder_icons.symlink_open elseif is_symlink then