Update gitlinker, use custom router for gitea
This commit is contained in:
parent
4648495a42
commit
1f0b857f0f
3 changed files with 42 additions and 15 deletions
|
@ -5,19 +5,42 @@ vim.keymap.set("n", "<Leader>bd", function()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--- gitlinker.nvim
|
--- gitlinker.nvim
|
||||||
require"gitlinker".setup()
|
require"gitlinker".setup({
|
||||||
vim.keymap.set("n", "<Leader>gh", function()
|
router = {
|
||||||
require"gitlinker".get_buf_range_url(
|
browse = {
|
||||||
"n",
|
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
|
||||||
{ action_callback = require"gitlinker.actions".open_in_browser }
|
.. "{_A.ORG}/"
|
||||||
)
|
.. "{_A.REPO}/commit/"
|
||||||
end, { silent = true })
|
.. "{_A.REV}/"
|
||||||
vim.keymap.set("v", "<leader>gh", function()
|
},
|
||||||
require"gitlinker".get_buf_range_url(
|
blame = {
|
||||||
"v",
|
["^git%.atomaka%.com"] = "https://git.atomaka.com/"
|
||||||
{ action_callback = require"gitlinker.actions".open_in_browser }
|
.. "{_A.ORG}/"
|
||||||
)
|
.. "{_A.REPO}/blame/"
|
||||||
end)
|
.. "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
|
--- gitsigns.nvim
|
||||||
require("gitsigns").setup()
|
require("gitsigns").setup()
|
||||||
|
@ -30,6 +53,10 @@ vim.g["git_messenger_always_into_popup"] = 1
|
||||||
require("nvim-surround").setup()
|
require("nvim-surround").setup()
|
||||||
|
|
||||||
--- telescope.nvim
|
--- telescope.nvim
|
||||||
|
vim.api.nvim_set_keymap('n', '<leader>t', ':Telescope<CR>', {
|
||||||
|
noremap = true,
|
||||||
|
silent = true,
|
||||||
|
})
|
||||||
vim.keymap.set("n", "<C-p>", function()
|
vim.keymap.set("n", "<C-p>", function()
|
||||||
require("telescope.builtin").find_files({
|
require("telescope.builtin").find_files({
|
||||||
file_ignore_patterns = {".git/", "node_modules/"},
|
file_ignore_patterns = {".git/", "node_modules/"},
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
|
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
|
||||||
"editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" },
|
"editorconfig.nvim": { "branch": "master", "commit": "5b9e303e1d6f7abfe616ce4cc8d3fffc554790bf" },
|
||||||
"git-messenger.vim": { "branch": "master", "commit": "edc603d4cda7894a743e383e16c638e206d03148" },
|
"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" },
|
"gitsigns.nvim": { "branch": "main", "commit": "1ef74b546732f185d0f806860fa5404df7614f28" },
|
||||||
"gruvbox": { "branch": "master", "commit": "143a3b8babcfd2bce6c99d6ba496942647c3e30b" },
|
"gruvbox": { "branch": "master", "commit": "143a3b8babcfd2bce6c99d6ba496942647c3e30b" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
"lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
|
||||||
|
|
|
@ -21,7 +21,7 @@ require("lazy").setup({
|
||||||
-- "FabijanZulj/blame.nvim",
|
-- "FabijanZulj/blame.nvim",
|
||||||
"rhysd/git-messenger.vim",
|
"rhysd/git-messenger.vim",
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
"ruifm/gitlinker.nvim",
|
"linrongbin16/gitlinker.nvim",
|
||||||
"tpope/vim-eunuch",
|
"tpope/vim-eunuch",
|
||||||
|
|
||||||
"gruvbox-community/gruvbox",
|
"gruvbox-community/gruvbox",
|
||||||
|
|
Loading…
Reference in a new issue