Compare commits

...

2 commits

Author SHA1 Message Date
4a79421eef
Link to blame commit
I really need to consolidate git plugins
2024-09-20 21:54:38 -04:00
1f0b857f0f
Update gitlinker, use custom router for gitea 2024-09-20 21:45:33 -04:00
3 changed files with 55 additions and 15 deletions

View file

@ -4,20 +4,54 @@ vim.keymap.set("n", "<Leader>bd", function()
require("bufdelete").bufdelete(0, true)
end)
--- gitblame.nvim
vim.g.gitblame_use_blame_commit_file_urls = true
vim.g.gitblame_display_virtual_text = 0
require('gitblame').setup {enabled = true}
vim.api.nvim_set_keymap('n', '<leader>gbo', ':GitBlameOpenCommitURL<CR>', {
noremap = true,
silent = true,
})
--- gitlinker.nvim
require"gitlinker".setup()
vim.keymap.set("n", "<Leader>gh", function()
require"gitlinker".get_buf_range_url(
"n",
{ action_callback = require"gitlinker.actions".open_in_browser }
)
end, { silent = true })
vim.keymap.set("v", "<leader>gh", function()
require"gitlinker".get_buf_range_url(
"v",
{ action_callback = require"gitlinker.actions".open_in_browser }
)
end)
require"gitlinker".setup({
router = {
browse = {
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/commit/"
.. "{_A.REV}/"
},
blame = {
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
.. "{_A.ORG}/"
.. "{_A.REPO}/blame/"
.. "branch/{_A.CURRENT_BRANCH}/"
.. "{_A.FILE}"
},
},
})
vim.keymap.set(
{"n", 'v'},
"<leader>gl",
function()
require("gitlinker").link({ action = require("gitlinker.actions").system })
end,
{ silent = true, noremap = true, desc = "GitLink!" }
)
vim.keymap.set(
{"n", 'v'},
"<leader>glb",
function()
require("gitlinker").link({
router_type = "blame",
action = require("gitlinker.actions").system,
})
end,
{ silent = true, noremap = true, desc = "GitLink! blame" }
)
--- gitsigns.nvim
require("gitsigns").setup()
@ -30,6 +64,10 @@ vim.g["git_messenger_always_into_popup"] = 1
require("nvim-surround").setup()
--- telescope.nvim
vim.api.nvim_set_keymap('n', '<leader>t', ':Telescope<CR>', {
noremap = true,
silent = true,
})
vim.keymap.set("n", "<C-p>", function()
require("telescope.builtin").find_files({
file_ignore_patterns = {".git/", "node_modules/"},

View file

@ -1,8 +1,9 @@
{
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
"editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" },
"git-blame.nvim": { "branch": "master", "commit": "8c56e864d448e84e0162872c381dd2715824dce2" },
"git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" },
"gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
"gitlinker.nvim": { "branch": "master", "commit": "a221c13fc3c7f5b8799933f4966ee8e618287292" },
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
"gruvbox": { "branch": "master", "commit": "143a3b8babcfd2bce6c99d6ba496942647c3e30b" },
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },

View file

@ -21,7 +21,8 @@ require("lazy").setup({
-- "FabijanZulj/blame.nvim",
"rhysd/git-messenger.vim",
"lewis6991/gitsigns.nvim",
"ruifm/gitlinker.nvim",
"linrongbin16/gitlinker.nvim",
"f-person/git-blame.nvim",
"tpope/vim-eunuch",
"gruvbox-community/gruvbox",