diff --git a/lua/openingh/init.lua b/lua/openingh/init.lua index dfb8ad9..5d32feb 100644 --- a/lua/openingh/init.lua +++ b/lua/openingh/init.lua @@ -1,5 +1,6 @@ local remote_format = "%s/blob/%s/%s" local bb_remote_format = "%s/src/%s/%s" +local forgejo_remote_format = "%s/src/%s/%s" local utils = require("openingh.utils") local M = {} @@ -69,6 +70,8 @@ function M.get_file_url( if string.find(M.repo_url, "bitbucket") then file_page_url = string.format(bb_remote_format, M.repo_url, rev, file_path) + elseif string.find(M.repo_url, "forgejo") or string.find(M.repo_url, "gitea") then + file_page_url = string.format(forgejo_remote_format, M.repo_url, rev, file_path) else file_page_url = string.format(remote_format, M.repo_url, rev, file_path) end