summaryrefslogtreecommitdiff
path: root/fnl/plugins/dial.fnl
blob: 0438529594f8e6db172ba7f4910725064bcb1cb6 (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
;; Better incrementation/decrementation.

(local keys [{1 :<C-a>
              2 (λ []
                  (let [dial (require :dial.map)]
                    (dial.inc_normal)))
              :expr true
              :desc :Increment}
             {1 :<C-x>
              2 (λ []
                  (let [dial (require :dial.map)]
                    (dial.dec_normal)))
              :expr true
              :desc :Decrement}])

(λ config []
  (let [cfg (require :dial.config)
        augend (require :dial.augend)]
    (cfg.augends:register_group {:default [augend.integer.alias.decimal
                                           augend.integer.alias.hex
                                           (. augend.date.alias "%Y-%m-%d")
                                           augend.constant.alias.bool
                                           augend.semver.alias.semver]})))

{1 :monaqa/dial.nvim : keys : config}