Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ Enable `show_builtin_git_pickers` to additionally show builtin git pickers.

```lua
{
-- Browse command to open commits in browser. Default fugitive GBrowse.
browse_command = "GBrowse",
-- fugitive or diffview
diff_plugin = "fugitive",
-- customize git in previewer
Expand Down
2 changes: 1 addition & 1 deletion lua/advanced_git_search/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ end
---General action: Open commit in browser
---@param commit_hash string
M.open_in_browser = function(commit_hash)
vim.api.nvim_command(":GBrowse " .. commit_hash)
vim.api.nvim_command(":" .. config.get_browse_command() .. commit_hash)
end

---General action: Checkout commit
Expand Down
5 changes: 5 additions & 0 deletions lua/advanced_git_search/utils/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ local config = {}
M.setup = function(ext_config)
ext_config = ext_config or {}

ext_config.browse_command = ext_config.browse_command or "GBrowse"
ext_config.diff_plugin = ext_config.diff_plugin or "fugitive"
ext_config.git_diff_flags = ext_config.git_diff_flags or {}
ext_config.show_builtin_git_pickers = ext_config.show_builtin_git_pickers
Expand Down Expand Up @@ -164,4 +165,8 @@ M.show_builtin_git_pickers = function()
return config["show_builtin_git_pickers"]
end

M.get_browse_command = function()
return config["browse_command"]
end

return M