This plugin implements tree view support for xplr.
None
-
Add the following line in
~/.config/xplr/init.lua
local home = os.getenv("HOME") package.path = home .. "/.config/xplr/plugins/?/init.lua;" .. home .. "/.config/xplr/plugins/?.lua;" .. package.path
-
Clone the plugin
mkdir -p ~/.config/xplr/plugins
git clone https://github.com/sayanarijit/tree-view.xplr ~/.config/xplr/plugins/tree-view
- Require the module in
~/.config/xplr/init.lua
require("tree-view").setup()
-- or
require("tree-view").setup({
mode = "switch_layout",
key = "T",
-- If you feel slowness, you might want to toggle back to the default view.
toggle_layout_mode = "default",
toggle_layout_key = "esc",
-- Press backspace to close all and back and close
close_all_and_back_mode = "default",
close_all_and_back_key = "backspace",
-- Toggle expansion without entering
toggle_expansion_mode = "default",
toggle_expansion_key = "o",
-- Toggle expansion of all the nodes under pwd
toggle_expansion_all_mode = "default",
toggle_expansion_all_key = "O",
-- Focus on the next visible line, not compatible with up/down action
focus_next_mode = "default",
focus_next_key = "]",
-- Focus on the previous visible line, not compatible with up/down action
focus_prev_mode = "default",
focus_prev_key = "[",
-- Go to the next deep level directory that's open
goto_next_open_mode = "default",
goto_next_open_key = ")",
-- Go to the previous deep level directory that's open
goto_prev_open_mode = "default",
goto_prev_open_key = "(",
-- Whether to display the tree in full screen
fullscreen = false,
-- Indent for the branches of the tree
indent = " ",
-- Start xplr with tree view layout
as_initial_layout = false,
-- Disables toggling layout.
as_default_layout = false,
-- Automatically fallback to this layout for better performance if the
-- branch contains # of nodes more than the threshold value
fallback_layout = "Table",
fallback_threshold = 500, -- default: nil (disabled)
})
- Supports vroot (type
:vv
to toggle)