nvim/lua/plugins/neotree.lua 1.3 K raw
1
return {
2
	"nvim-neo-tree/neo-tree.nvim",
3
	branch = "v3.x",
4
	dependencies = {
5
		"nvim-lua/plenary.nvim",
6
		"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
7
		"MunifTanjim/nui.nvim",
8
		-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
9
	},
10
	config = function()
11
		local opts = { noremap = true, silent = true }
12
		local map = vim.api.nvim_set_keymap
13
		map("n", "<leader>e", ":Neotree toggle<CR>", opts)
14
		require("neo-tree").setup({
15
			popup_border_style = "rounded",
16
			enable_git_status = true,
17
			window = {
18
				position = "float",
19
			},
20
			filesystem = {
21
				filtered_items = {
22
					hide_dotfiles = false,
23
					always_show = {
24
						"*.env",
25
					},
26
				},
27
			},
28
			default_component_configs = {
29
				git_status = {
30
					symbols = {
31
						-- Change type
32
						added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
33
						modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
34
						deleted = "✖", -- this can only be used in the git_status source
35
						renamed = "󰁕", -- this can only be used in the git_status source
36
						-- Status type
37
						untracked = "",
38
						ignored = "",
39
						unstaged = "󰄱",
40
						staged = "",
41
						conflict = "",
42
					},
43
				},
44
			},
45
		})
46
	end,
47
}