all repos

init.lua @ d6fe47b8e0039ca1a0e202cae407bc7b4b971470

my nvim config

init.lua/lua/plugins/oil.lua(view raw)

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
41
42
43
44
45
46
47
48
49
50
local map = require("core.utils").smap
return {
  "stevearc/oil.nvim",
  lazy = false,
  keys = { { "<leader>e", map("oil", "open") } },
  opts = {
    columns = { "icon" },
    use_default_keymaps = false,
    delete_to_trash = true,
    keymaps = {
      ["?"] = "actions.show_help",
      ["."] = "actions.toggle_hidden",

      ["<CR>"] = "actions.select",
      ["<tab>"] = "actions.select",

      ["<C-v>"] = "actions.select_vsplit",
      ["<C-s>"] = "actions.select_split",
      ["<A-p>"] = "actions.preview",
      ["<C-r>"] = "actions.refresh",
      ["<C-c>"] = "actions.close",

      ["-"] = "actions.parent",
      ["_"] = "actions.open_cwd",
      [","] = "actions.parent",
      ["<"] = "actions.open_cwd",
      ["`"] = "actions.cd",
      ["~"] = "actions.tcd",
    },
    view_options = {
      show_hidden = true,
      is_always_hidden = function(name, _)
        if
          ({
            [".git"] = {},
            [".vscode"] = {},
            ["dist"] = {},
            ["node_modules"] = {},
            ["__pycache__"] = {},
            ["vendor"] = {},
            ["target"] = {},
          })[name]
        then
          return true
        end
        return false
      end,
    },
  },
}