2024-11-07 19:16:27 +00:00
|
|
|
--
|
|
|
|
-- Pretty file tree with various sources
|
|
|
|
--
|
|
|
|
-- Source: https://github.com/nvim-neo-tree/neo-tree.nvim
|
|
|
|
-- ..............................................
|
|
|
|
--
|
|
|
|
-- Author: Sven Vogel
|
|
|
|
-- Created: 01.11.2024
|
|
|
|
-- Edited: 07.11.2024
|
|
|
|
--
|
|
|
|
-- ==============================================
|
|
|
|
|
2024-11-24 16:20:14 +00:00
|
|
|
local ui = require 'config.ui'
|
|
|
|
local icons = require 'config.icons'
|
2024-11-07 19:14:19 +00:00
|
|
|
|
2024-10-31 10:06:01 +00:00
|
|
|
return {
|
|
|
|
"nvim-neo-tree/neo-tree.nvim",
|
2024-11-01 15:48:53 +00:00
|
|
|
lazy = false,
|
2024-10-31 10:06:01 +00:00
|
|
|
branch = "v3.x",
|
|
|
|
dependencies = {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
"nvim-tree/nvim-web-devicons",
|
2024-11-10 21:34:23 +00:00
|
|
|
"MunifTanjim/nui.nvim",
|
2024-10-31 10:06:01 +00:00
|
|
|
},
|
|
|
|
cmd = "Neotree",
|
|
|
|
opts = {
|
2024-11-07 19:14:19 +00:00
|
|
|
popup_border_style = ui.border,
|
2024-11-10 21:34:23 +00:00
|
|
|
diagnostics = {
|
2024-11-24 16:20:14 +00:00
|
|
|
follow_current_file = { -- May also be set to `true` or `false`
|
|
|
|
enabled = true, -- This will find and focus the file in the active buffer every time
|
2024-11-10 21:34:23 +00:00
|
|
|
always_focus_file = false, -- Focus the followed file, even when focus is currently on a diagnostic item belonging to that file
|
2024-11-24 16:20:14 +00:00
|
|
|
expand_followed = true, -- Ensure the node of the followed file is expanded
|
|
|
|
leave_dirs_open = true, -- `false` closes auto expanded dirs, such as with `:Neotree reveal`
|
|
|
|
leave_files_open = true, -- `false` closes auto expanded files, such as with `:Neotree reveal`
|
2024-11-10 21:34:23 +00:00
|
|
|
}
|
|
|
|
},
|
2024-11-08 17:22:53 +00:00
|
|
|
filesystem = {
|
2024-10-31 10:06:01 +00:00
|
|
|
bind_to_cwd = false,
|
2024-11-08 17:22:53 +00:00
|
|
|
follow_current_file = { enabled = true },
|
|
|
|
use_libuv_file_watcher = true,
|
2024-10-31 10:06:01 +00:00
|
|
|
hijack_netrw_behavior = "open_default",
|
|
|
|
filtered_items = {
|
|
|
|
hide_dotfiles = false,
|
|
|
|
hide_gitignored = false,
|
|
|
|
hide_hidden = false, -- only works on Windows for hidden files/directories
|
2024-11-01 15:48:53 +00:00
|
|
|
},
|
|
|
|
window = {
|
|
|
|
position = "left"
|
2024-10-31 10:06:01 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
close_if_last_window = false,
|
2024-11-08 17:22:53 +00:00
|
|
|
default_component_configs = {
|
2024-10-31 10:06:01 +00:00
|
|
|
container = {
|
|
|
|
enable_character_fade = true
|
|
|
|
},
|
|
|
|
indent = {
|
|
|
|
indent_size = 2,
|
|
|
|
padding = 1, -- extra padding on left hand side
|
|
|
|
with_markers = true,
|
|
|
|
indent_marker = "│",
|
|
|
|
last_indent_marker = "└",
|
2024-11-08 17:22:53 +00:00
|
|
|
with_expanders = true, -- if nil and file nesting is enabled, will enable expanders
|
2024-11-24 16:20:14 +00:00
|
|
|
expander_collapsed = icons.folds.open,
|
|
|
|
expander_expanded = icons.folds.closed,
|
2024-11-08 17:22:53 +00:00
|
|
|
expander_highlight = "NeoTreeExpander",
|
2024-11-24 16:20:14 +00:00
|
|
|
},
|
|
|
|
icon = {
|
|
|
|
folder_closed = icons.folder.closed,
|
|
|
|
folder_open = icons.folder.open,
|
|
|
|
folder_empty = icons.folder.empty,
|
|
|
|
default = icons.file
|
2024-11-08 17:22:53 +00:00
|
|
|
}
|
2024-10-31 10:06:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|