summaryrefslogtreecommitdiff
path: root/config/nvim/lua/plugins/tree.lua
blob: 30c0599304c26708d509c9a8b42201b98cf6263f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
local WIDTH_RATIO = 0.25

return {
	"nvim-tree/nvim-tree.lua",
	dependencies = {
		"nvim-tree/nvim-web-devicons",
	},
	opts = {
		disable_netrw = true,
		hijack_netrw = true,
		sort = {
			sorter = "case_sensitive",
		},
		view = {
			width = function()
				return math.floor(vim.opt.columns:get() * WIDTH_RATIO)
			end,
			adaptive_size = true,
			centralize_selection = true,
		},
		git = {
			enable = true,
		},
		renderer = {
			group_empty = true,
			highlight_git = true,
			icons = {
				show = {
					git = true,
				},
			},
		},
		filters = {
			dotfiles = false,
		},
		update_focused_file = {
			enable = true,
		},
	},
}