gitsigns.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. }
  48. end
  49. M.setup = function()
  50. local status_ok, gitsigns = pcall(require, "gitsigns")
  51. if not status_ok then
  52. return
  53. end
  54. gitsigns.setup(lvim.builtin.gitsigns)
  55. end
  56. return M