about summary refs log tree commit diff
path: root/fnl/nvrc/packs/gitsigns.fnl
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-03-19 00:40:13 +0900
committersefidel <contact@sefidel.net>2022-03-19 00:40:13 +0900
commit7bf8727cb4c81ea3c41b03f4e796461c91c6b281 (patch)
tree64f86d233117eff6bb7a2f95bab4184122227139 /fnl/nvrc/packs/gitsigns.fnl
parent8c20872b33f89eeb45f9271d9eb3a453899e97e8 (diff)
downloadnvimrc-7bf8727cb4c81ea3c41b03f4e796461c91c6b281.tar.gz
nvimrc-7bf8727cb4c81ea3c41b03f4e796461c91c6b281.zip
feat(pack): add gitsigns
Diffstat (limited to 'fnl/nvrc/packs/gitsigns.fnl')
-rw-r--r--fnl/nvrc/packs/gitsigns.fnl12
1 files changed, 12 insertions, 0 deletions
diff --git a/fnl/nvrc/packs/gitsigns.fnl b/fnl/nvrc/packs/gitsigns.fnl
new file mode 100644
index 0000000..c7dbed1
--- /dev/null
+++ b/fnl/nvrc/packs/gitsigns.fnl
@@ -0,0 +1,12 @@
+(import-macros {: map!} :nvrc.macro.keymap)
+
+(local {: setup} (require :gitsigns))
+
+(setup {:signs {:add {:text "+"}
+                :change {:text "~"}
+                :delete {:text "_"}
+                :topdelete {:text "‾"}
+                :changedelete {:text "~"}}
+        :on_attach (fn [bufnr]
+                      (map! [n :expr] "]c" "&diff ? ']c' : '<cmd>Gitsigns next_hunk<cr>'")
+                      (map! [n :expr] "[c" "&diff ? '[c' : '<cmd>Gitsigns prev_hunk<cr>'"))})