diff --git a/lua/plugins/open-browser-github.lua b/lua/plugins/open-browser-github.lua index 9bf68b0..d9911e2 100644 --- a/lua/plugins/open-browser-github.lua +++ b/lua/plugins/open-browser-github.lua @@ -1,4 +1,15 @@ return { "tyru/open-browser-github.vim", dependencies = { { "tyru/open-browser.vim" } }, + config = function() + local map = LazyVim.safe_keymap_set + + map("n", "of", function() + vim.cmd("OpenGithubFile") + end, { desc = "Open Github file" }) + + map("v", "of", function() + vim.api.nvim_command("'<,'>OpenGithubFile") + end, { desc = "Open Github file (visual)" }) + end, }