summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/nvim-tree.lua
blob: a2d4532c269ec43647ca4b672e5bef4f19c5a9a1 (plain)
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
return {
    {
        "nvim-tree/nvim-tree.lua",
        lazy = false,
        dependencies = {
            "nvim-tree/nvim-web-devicons",
        },
        opts = {
            sort_by = "case_sensitive",
            diagnostics = {
                enable = false,
                icons = {
                    hint = "❔",
                    info = "❕",
                    warning = "❗",
                    error = "❌",
                }
            },
            view = {
                adaptive_size = true,
            },
            renderer = {
                group_empty = true,
            },
            filters = {
                dotfiles = true,
            },
        },
        init = function()
            vim.g.loaded_netrw = 1
            vim.g.loaded_netrwPlugin = 1

            local map = require("helpers.keys").map

            map("n", "vt", "<cmd>NvimTreeToggle<cr>")
            map("n", "vr", "<cmd>NvimTreeRefresh<cr>")
            map("n", "vs", "<cmd>NvimTreeFindFile<cr>")
        end,
    },
}