summaryrefslogtreecommitdiff
path: root/lua/lvim/core/gitsigns.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lvim/core/gitsigns.lua')
-rw-r--r--lua/lvim/core/gitsigns.lua64
1 files changed, 64 insertions, 0 deletions
diff --git a/lua/lvim/core/gitsigns.lua b/lua/lvim/core/gitsigns.lua
new file mode 100644
index 00000000..cc6387dc
--- /dev/null
+++ b/lua/lvim/core/gitsigns.lua
@@ -0,0 +1,64 @@
+local M = {}
+
+M.config = function()
+ lvim.builtin.gitsigns = {
+ active = true,
+ on_config_done = nil,
+ opts = {
+ signs = {
+ add = {
+ hl = "GitSignsAdd",
+ text = "â–Ž",
+ numhl = "GitSignsAddNr",
+ linehl = "GitSignsAddLn",
+ },
+ change = {
+ hl = "GitSignsChange",
+ text = "â–Ž",
+ numhl = "GitSignsChangeNr",
+ linehl = "GitSignsChangeLn",
+ },
+ delete = {
+ hl = "GitSignsDelete",
+ text = "契",
+ numhl = "GitSignsDeleteNr",
+ linehl = "GitSignsDeleteLn",
+ },
+ topdelete = {
+ hl = "GitSignsDelete",
+ text = "契",
+ numhl = "GitSignsDeleteNr",
+ linehl = "GitSignsDeleteLn",
+ },
+ changedelete = {
+ hl = "GitSignsChange",
+ text = "â–Ž",
+ numhl = "GitSignsChangeNr",
+ linehl = "GitSignsChangeLn",
+ },
+ },
+ numhl = false,
+ linehl = false,
+ keymaps = {
+ -- Default keymap options
+ noremap = true,
+ buffer = true,
+ },
+ watch_gitdir = { interval = 1000 },
+ sign_priority = 6,
+ update_debounce = 200,
+ status_formatter = nil, -- Use default
+ },
+ }
+end
+
+M.setup = function()
+ local gitsigns = require "gitsigns"
+
+ gitsigns.setup(lvim.builtin.gitsigns.opts)
+ if lvim.builtin.gitsigns.on_config_done then
+ lvim.builtin.gitsigns.on_config_done(gitsigns)
+ end
+end
+
+return M