git.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. local M = {
  2. {
  3. "tpope/vim-fugitive",
  4. config = function()
  5. print("Magic")
  6. -- For init.lua
  7. vim.g.fugitive_git_executable = "env GPG_TTY=$(tty) git"
  8. vim.env.GPG_TTY = vim.fn.system("tty"):gsub("\n", "")
  9. end,
  10. },
  11. {
  12. "lewis6991/gitsigns.nvim",
  13. config = function()
  14. require("gitsigns").setup({
  15. current_line_blame_formatter = "<author>, <author_time:%Y-%m-%d> - <summary>",
  16. current_line_blame = true,
  17. signs = {
  18. add = { text = icons.ui.BoldLineMiddle },
  19. change = { text = icons.ui.BoldLineDashedMiddle },
  20. delete = { text = icons.ui.TriangleShortArrowRight },
  21. topdelete = { text = icons.ui.TriangleShortArrowRight },
  22. changedelete = { text = icons.ui.BoldLineMiddle },
  23. },
  24. })
  25. end,
  26. },
  27. {
  28. "ruifm/gitlinker.nvim",
  29. config = function()
  30. require("gitlinker").setup({
  31. message = false,
  32. console_log = false,
  33. })
  34. nmap("<leader>gy", "<cmd>lua require('gitlinker').get_buf_range_url('n')<cr>")
  35. end,
  36. },
  37. }
  38. return M