diff options
author | christianchiarulli <[email protected]> | 2021-07-12 19:30:07 -0400 |
---|---|---|
committer | christianchiarulli <[email protected]> | 2021-07-12 19:30:07 -0400 |
commit | 476f7bb22f1d6d696ad9c2e2cc6e574167aef841 (patch) | |
tree | fa2e3a6db5b2726b0bd82c8fdf5bcb8db3574a39 /lua/core/gitsigns.lua | |
parent | ab103baf51273c994b7f219e96646a9222d6c7e6 (diff) |
poc for refactor into one file
Diffstat (limited to 'lua/core/gitsigns.lua')
-rw-r--r-- | lua/core/gitsigns.lua | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/lua/core/gitsigns.lua b/lua/core/gitsigns.lua new file mode 100644 index 00000000..bc310ad6 --- /dev/null +++ b/lua/core/gitsigns.lua @@ -0,0 +1,59 @@ +local M = {} +M.config = function() + O.plugin.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", + }, + 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_index = { interval = 1000 }, + sign_priority = 6, + update_debounce = 200, + status_formatter = nil, -- Use default + use_decoration_api = false, + } +end + +M.setup = function() + local status_ok, gitsigns = pcall(require, "gitsigns") + if not status_ok then + return + end + gitsigns.setup(O.plugin.gitsigns) +end + +return M |