gitsigns.lua 1.5 KB

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