mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(neo-tree): add h/l navigation and open file support
This commit is contained in:
parent
0f6ff53ce3
commit
7c74d1d5f5
1 changed files with 20 additions and 0 deletions
|
|
@ -87,6 +87,26 @@ return {
|
|||
end,
|
||||
desc = "Open with System Application",
|
||||
},
|
||||
["h"] = function(state)
|
||||
local node = state.tree:get_node()
|
||||
if node:has_children() and node:is_expanded() then
|
||||
state.commands.toggle_node(state)
|
||||
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:has_children() then
|
||||
if not node:is_expanded() then
|
||||
state.commands.toggle_node(state)
|
||||
else
|
||||
require("neo-tree.ui.renderer").focus_node(state, node:get_child_ids()[1])
|
||||
end
|
||||
else
|
||||
state.commands.open(state)
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
default_component_configs = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue