Nvim: add dap, tshjkl bindings, working gitlinker

This commit is contained in:
Robert Kmieć
2023-11-28 23:23:34 +01:00
parent dbc1095cb4
commit 0acc861edd
7 changed files with 92 additions and 34 deletions

View File

@@ -3,27 +3,22 @@ return {
dependencies = {
'nvim-lua/plenary.nvim'
},
opts = {
-- callbacks = {
-- ["git.viessmann.com"] = function(url_data)
-- local url = require'gitlinker.hosts'.get_base_https_url(url_data)
-- if not url_data.file or not url_data.rev then
-- return url
-- end
-- url = url .. "/src/" .. url_data.rev .. "/" .. url_data.file
--
-- if not url_data.lstart then
-- return url
-- end
-- url = url .. "#lines-" .. url_data.lstart
-- if url_data.lend then
-- url = url .. ":" .. url_data.lend
-- end
--
-- return url
-- end
-- },
-- default mapping to call url generation with action_callback
mappings = "<leader>gl"
}
config = function()
require('gitlinker').setup({
router = {
browse = {
-- example: ssh://git@git.viessmann.com:7999/sysfunc/efmclib.git
["^git%.viessmann%.com"] = "https://git.viessmann.com/projects/"
.. "{_A.USER}/repos/"
.. "{_A.REPO}/browse/"
.. "{_A.FILE}"
.. "#{_A.LSTART}"
.. "{(_A.LEND > _A.LSTART and ('-' .. _A.LEND) or '')}",
}
},
debug = true,
file_log = true,
})
end,
cmd = "GitLink"
}