Vim cleanups

This commit is contained in:
2023-02-27 16:41:19 +09:00
parent 3cc491c93b
commit 6f3b7152ab
7 changed files with 57 additions and 42 deletions

View File

@@ -48,6 +48,24 @@ return {
window = {
mappings = {
["<space>"] = "none",
["h"] = function(state)
local node = state.tree:get_node()
if node.type == 'directory' and node:is_expanded() then
require'neo-tree.sources.filesystem'.toggle_directory(state, node)
else
require'neo-tree.ui.renderer'.focus_node(state, node:get_parent_id())
end
end,
["l"] = function(state)
local node = state.tree:get_node()
if node.type == 'directory' then
if not node:is_expanded() then
require'neo-tree.sources.filesystem'.toggle_directory(state, node)
elseif node:has_children() then
require'neo-tree.ui.renderer'.focus_node(state, node:get_child_ids()[1])
end
end
end,
},
},
filesystem = {