summaryrefslogtreecommitdiff
path: root/fnl/plugins/editor/gitsigns.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'fnl/plugins/editor/gitsigns.fnl')
-rw-r--r--fnl/plugins/editor/gitsigns.fnl27
1 files changed, 27 insertions, 0 deletions
diff --git a/fnl/plugins/editor/gitsigns.fnl b/fnl/plugins/editor/gitsigns.fnl
index 1ef8cbc..86f001c 100644
--- a/fnl/plugins/editor/gitsigns.fnl
+++ b/fnl/plugins/editor/gitsigns.fnl
@@ -1,5 +1,32 @@
;; Add git signs to source files.
+(local keys [{1 :mq 2 "<cmd>Gitsigns diffthis HEAD<cr>" :desc "Gitsigns diff"}
+ {1 :<leader>gR
+ 2 "<cmd>lua require 'gitsigns'.reset_buffer()<cr>"
+ :desc "Reset Buffer"}
+ {1 :<leader>gd 2 "<cmd>Gitsigns diffthis HEAD<cr>" :desc :Diff}
+ {1 :<leader>gj
+ 2 "<cmd>lua require 'gitsigns'.next_hunk()<cr>"
+ :desc "Next Hunk"}
+ {1 :<leader>gk
+ 2 "<cmd>lua require 'gitsigns'.prev_hunk()<cr>"
+ :desc "Prev Hunk"}
+ {1 :<leader>gl
+ 2 "<cmd>lua require 'gitsigns'.blame_line()<cr>"
+ :desc :Blame}
+ {1 :<leader>gp
+ 2 "<cmd>lua require 'gitsigns'.preview_hunk()<cr>"
+ :desc "Preview Hunk"}
+ {1 :<leader>gr
+ 2 "<cmd>lua require 'gitsigns'.reset_hunk()<cr>"
+ :desc "Reset Hunk"}
+ {1 :<leader>gs
+ 2 "<cmd>lua require 'gitsigns'.stage_hunk()<cr>"
+ :desc "Stage Hunk"}
+ {1 :<leader>gu
+ 2 "<cmd>lua require 'gitsigns'.undo_stage_hunk()<cr>"
+ :desc "Undo Stage Hunk"}])
+
(local signs {:add {:hl :GitSignsAdd
:text "|"
:numhl :GitSignsAddNr