summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins/nvim-tree.lua
blob: 422a402475c532e9180cb3b70d78fbe5ab0744c6 (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
return {
    {
        "nvim-tree/nvim-tree.lua",
        lazy = false,
        dependencies = {
            "nvim-tree/nvim-web-devicons",
        },
        opts = {
            sort = {
                sorter = "case_sensitive"
            },
            diagnostics = {
                enable = true,
                icons = {
                    hint = "❔",
                    info = "❕",
                    warning = "❗",
                    error = "❌",
                }
            },
            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,
    },
}