dotfiles-nvim/lua/plugins/neo-tree.lua

60 lines
1.9 KiB
Lua
Raw Normal View History

2023-12-18 09:11:00 +01:00
return {
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
2023-12-20 12:12:56 +01:00
"nvim-tree/nvim-web-devicons",
2023-12-18 09:11:00 +01:00
"MunifTanjim/nui.nvim",
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
"mrbjarksen/neo-tree-diagnostics.nvim",
2023-12-18 09:11:00 +01:00
},
lazy = false,
2023-12-20 12:01:08 +01:00
opts = {
sources = {
"filesystem",
"buffers",
"git_status",
"diagnostics",
},
2023-12-20 12:01:08 +01:00
filesystem = {
filtered_items = {
visible = true,
hide_dotfiles = false,
hide_gitignored = false,
hide_hidden = false,
2023-12-18 09:11:00 +01:00
},
2023-12-20 12:01:08 +01:00
follow_current_file = {
enabled = true,
2023-12-18 09:11:00 +01:00
},
group_empty_dirs = true, -- Not working well
2023-12-20 12:01:08 +01:00
use_libuv_file_watcher = true,
},
buffers = {
follow_current_file = {
enabled = true,
},
group_empty_dirs = true,
},
window = {
position = "right",
width = 30,
auto_expand_width = true,
2023-12-20 12:01:08 +01:00
},
source_selector = {
winbar = true,
sources = {
{ source = "filesystem" },
{ source = "buffers" },
{ source = "diagnostics"},
},
2024-01-07 18:19:07 +01:00
},
2023-12-20 12:01:08 +01:00
},
2023-12-18 09:11:00 +01:00
keys = {
2023-12-20 12:01:08 +01:00
{ "<C-N>t", "<cmd>Neotree toggle<cr>", "Toggle Neotree" },
2023-12-18 09:11:00 +01:00
{ "<C-N>f", "<cmd>Neotree filesystem focus<cr>", "Focus filesystem in Neotree" },
2023-12-20 12:01:08 +01:00
{ "<C-N>b", "<cmd>Neotree buffers focus<cr>", "Focus buffers in Neotree" },
2023-12-18 09:11:00 +01:00
{ "<C-N>g", "<cmd>Neotree git_status focus<cr>", "Focus git status in Neotree" },
{ "<C-N>d", "<cmd>Neotree diagnostics focus<cr>", "Focus diagnostics in Neotree" },
2023-12-18 09:11:00 +01:00
},
}