gitsigns.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. local M = {}
  2. M.config = function()
  3. lvim.builtin.gitsigns = {
  4. signs = {
  5. add = {
  6. hl = "GitSignsAdd",
  7. text = "▎",
  8. numhl = "GitSignsAddNr",
  9. linehl = "GitSignsAddLn",
  10. },
  11. change = {
  12. hl = "GitSignsChange",
  13. text = "▎",
  14. numhl = "GitSignsChangeNr",
  15. linehl = "GitSignsChangeLn",
  16. },
  17. delete = {
  18. hl = "GitSignsDelete",
  19. text = "契",
  20. numhl = "GitSignsDeleteNr",
  21. linehl = "GitSignsDeleteLn",
  22. },
  23. topdelete = {
  24. hl = "GitSignsDelete",
  25. text = "契",
  26. numhl = "GitSignsDeleteNr",
  27. linehl = "GitSignsDeleteLn",
  28. },
  29. changedelete = {
  30. hl = "GitSignsChange",
  31. text = "▎",
  32. numhl = "GitSignsChangeNr",
  33. linehl = "GitSignsChangeLn",
  34. },
  35. },
  36. numhl = false,
  37. linehl = false,
  38. keymaps = {
  39. -- Default keymap options
  40. noremap = true,
  41. buffer = true,
  42. },
  43. watch_index = { interval = 1000 },
  44. sign_priority = 6,
  45. update_debounce = 200,
  46. status_formatter = nil, -- Use default
  47. use_decoration_api = false,
  48. }
  49. end
  50. M.setup = function()
  51. local status_ok, gitsigns = pcall(require, "gitsigns")
  52. if not status_ok then
  53. return
  54. end
  55. gitsigns.setup(lvim.builtin.gitsigns)
  56. end
  57. return M