init.lua 1.3 KB

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