Skip to main content

Neo-tree

info

You can enable the extra with the :LazyExtras command. Plugins marked as optional will only be configured if they are installed.

Below you can find a list of included plugins and their default settings.

caution

You don't need to copy the default settings to your config. They are only shown here for reference.

neo-tree.nvim

file explorer

opts = {
sources = { "filesystem", "buffers", "git_status" },
open_files_do_not_replace_types = { "terminal", "Trouble", "trouble", "qf", "Outline" },
filesystem = {
bind_to_cwd = false,
follow_current_file = { enabled = true },
use_libuv_file_watcher = true,
},
window = {
mappings = {
["l"] = "open",
["h"] = "close_node",
["<space>"] = "none",
["Y"] = {
function(state)
local node = state.tree:get_node()
local path = node:get_id()
vim.fn.setreg("+", path, "c")
end,
desc = "Copy Path to Clipboard",
},
["O"] = {
function(state)
require("lazy.util").open(state.tree:get_node().path, { system = true })
end,
desc = "Open with System Application",
},
["P"] = { "toggle_preview", config = { use_float = false } },
},
},
default_component_configs = {
indent = {
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
expander_collapsed = "",
expander_expanded = "",
expander_highlight = "NeoTreeExpander",
},
git_status = {
symbols = {
unstaged = "󰄱",
staged = "󰱒",
},
},
},
}