summaryrefslogtreecommitdiff
path: root/lua/core/gitsigns.lua
diff options
context:
space:
mode:
authorchristianchiarulli <[email protected]>2021-08-29 14:17:32 -0400
committerchristianchiarulli <[email protected]>2021-08-29 14:17:32 -0400
commited5559d259e38a78796a7d81421f02ba6dafac4b (patch)
treeafa9c00c017382bac547265a8a1e16b9770a07eb /lua/core/gitsigns.lua
parente7b6d3b6f5982ea1042ffd499a7b85c18f0b782e (diff)
parentc7a5122fe2c14dba0f28f1c077f838f957884afc (diff)
Merge branch 'rolling' of github.com:ChristianChiarulli/LunarVim
Diffstat (limited to 'lua/core/gitsigns.lua')
-rw-r--r--lua/core/gitsigns.lua96
1 files changed, 50 insertions, 46 deletions
diff --git a/lua/core/gitsigns.lua b/lua/core/gitsigns.lua
index 9e023762..bb9d088b 100644
--- a/lua/core/gitsigns.lua
+++ b/lua/core/gitsigns.lua
@@ -1,60 +1,64 @@
local M = {}
-local Log = require "core.log"
+
M.config = function()
lvim.builtin.gitsigns = {
- 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",
+ 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",
+ },
},
- topdelete = {
- hl = "GitSignsDelete",
- text = "契",
- numhl = "GitSignsDeleteNr",
- linehl = "GitSignsDeleteLn",
+ numhl = false,
+ linehl = false,
+ keymaps = {
+ -- Default keymap options
+ noremap = true,
+ buffer = true,
},
- changedelete = {
- hl = "GitSignsChange",
- text = "â–Ž",
- numhl = "GitSignsChangeNr",
- linehl = "GitSignsChangeLn",
- },
- },
- numhl = false,
- linehl = false,
- keymaps = {
- -- Default keymap options
- noremap = true,
- buffer = true,
+ watch_index = { interval = 1000 },
+ sign_priority = 6,
+ update_debounce = 200,
+ status_formatter = nil, -- Use default
},
- watch_index = { interval = 1000 },
- sign_priority = 6,
- update_debounce = 200,
- status_formatter = nil, -- Use default
}
end
M.setup = function()
- local status_ok, gitsigns = pcall(require, "gitsigns")
- if not status_ok then
- Log:get_default().error "Failed to load gitsigns"
- return
+ 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
- gitsigns.setup(lvim.builtin.gitsigns)
end
return M