about summary refs log tree commit diff
path: root/fnl/nvrc/packs/lir.fnl
blob: 18b85d6c864a6291f521a694aa3d1ac64d81a3e2 (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
(local lir (require :lir))
(local actions (require :lir.actions))
(local mark-actions (require :lir.mark.actions))
(local clipboard-actions (require :lir.clipboard.actions))

(lir.setup {:show_hidden_files false
            :mappings {:l actions.edit
                       :<C-s> actions.split
                       :<C-v> actions.vsplit
                       :<C-t> actions.tabedit
                       :h actions.up
                       :q actions.quit
                       :K actions.mkdir
                       :N actions.newfile
                       :R actions.rename
                       "@" actions.cd
                       :Y actions.yank_path
                       :. actions.toggle_show_hidden
                       :D actions.delete
                       :J (fn []
                            (mark-actions.toggle_mark)
                            (vim.cmd "normal! j"))
                       :C clipboard-actions.copy
                       :X clipboard-actions.cut
                       :P clipboard-actions.paste}
            :float {:winblend 0
                    :win_opts (fn []
                                (let [width (math.floor (* vim.o.columns 0.5))
                                      height (math.floor (* vim.o.lines 0.5))]
                                  {:border :rounded
                                   : width
                                   : height
                                   :row (-> vim.o.lines (- height) (/ 2) (math.floor) (- 5))
                                   :col (-> vim.o.columns (- width) (/ 2)
                                            (math.floor))}))}
            :hide_cursor false})