summaryrefslogtreecommitdiff
path: root/xplr/init.lua
blob: db4f0b53e777148c375356cda86657609f24bc93 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
version = "0.21.3"

local home = os.getenv("HOME")
package.path = home
  .. "/.config/xplr/plugins/?/init.lua;"
  .. home
  .. "/.config/xplr/plugins/?.lua;"
  .. package.path

local xpm_path = home .. "/.local/share/xplr/dtomvan/xpm.xplr"
local xpm_url = "https://github.com/dtomvan/xpm.xplr"
package.path = package.path
.. ";"
  .. xpm_path
  .. "/?.lua;"
  .. xpm_path
  .. "/?/init.lua"

os.execute(
  string.format(
    "[ -e '%s' ] || git clone '%s' '%s'",
    xpm_path,
    xpm_url,
    xpm_path
  )
)

require("xpm").setup({
  plugins = {
    'dtomvan/xpm.xplr',
    'sayanarijit/fzf.xplr',
    'gitlab:hartan/web-devicons.xplr',
    'sayanarijit/wl-clipboard.xplr',
    'sayanarijit/map.xplr',
    'sayanarijit/command-mode.xplr',
    'sayanarijit/zoxide.xplr',
    'sayanarijit/zentable.xplr',
  },
  auto_install = true,
  auto_cleanup = true,
})

xplr.config.modes.builtin.default.key_bindings.on_key.x = {
  help = "xpm",
  messages = {
    "PopMode",
    { SwitchModeCustom = "xpm" },
  },
}

require("fzf").setup({
    mode = "default",
    key = "ctrl-f",
    bin = "fzf",
    recursive = true,
    enter_dir = true,
})

require("command-mode").setup()
require("wl-clipboard").setup()
require("map").setup()
require("zoxide").setup()
require("zentable").setup()
require("icons").setup()