summaryrefslogtreecommitdiff
path: root/fnl/plugins
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-23 21:52:11 +0100
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2023-01-23 21:52:11 +0100
commitbae106d7ef24dae48c46584d9b0b233eb8720a1b (patch)
tree286929622d0ebe8f371563ab09254bd751fb683b /fnl/plugins
parent5e897777faab1e456b23a5084dac519886fbd797 (diff)
Add dial.nvim
Diffstat (limited to 'fnl/plugins')
-rw-r--r--fnl/plugins/editor/dial.fnl26
1 files changed, 26 insertions, 0 deletions
diff --git a/fnl/plugins/editor/dial.fnl b/fnl/plugins/editor/dial.fnl
new file mode 100644
index 0000000..319f7a7
--- /dev/null
+++ b/fnl/plugins/editor/dial.fnl
@@ -0,0 +1,26 @@
+;; Better incrementation/decrementation.
+
+(local keys [{1 :<C-a>
+ 2 (fn []
+ (let [dial (require :dial.map)]
+ (dial.inc_normal)))
+ :expr true
+ :desc :Increment}
+ {1 :<C-x>
+ 2 (fn []
+ (let [dial (require :dial.map)]
+ (dial.dec_normal)))
+ :expr true
+ :desc :Decrement}])
+
+(fn 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}