mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(lazygit): add user extensible capability for M.remote_patterns
This commit is contained in:
parent
7c7c196a78
commit
8191b42d7e
2 changed files with 9 additions and 0 deletions
|
|
@ -18,6 +18,13 @@ vim.g.lazyvim_picker = "auto"
|
|||
-- * a function with signature `function(buf) -> string|string[]`
|
||||
vim.g.root_spec = { "lsp", { ".git", "lua" }, "cwd" }
|
||||
|
||||
-- You can use this to extend the patterns used by `LazyVim.lazygit.browse`
|
||||
-- It should be a list of tables with two string patterns, one for the original
|
||||
-- and one for the replacement
|
||||
-- vim.g.lazygit_remote_patterns = {
|
||||
-- { "^ssh://.*@(.*)$", "https://%1" },
|
||||
-- }
|
||||
|
||||
-- LazyVim automatically configures lazygit:
|
||||
-- * theme, based on the active colorscheme.
|
||||
-- * editPreset to nvim-remote
|
||||
|
|
|
|||
|
|
@ -177,6 +177,8 @@ M.remote_patterns = {
|
|||
{ "%.git$" , "" },
|
||||
}
|
||||
|
||||
M.remote_patterns = vim.list_extend(M.remote_patterns, vim.g.lazygit_remote_patterns or {})
|
||||
|
||||
---@param remote string
|
||||
function M.get_url(remote)
|
||||
local ret = remote
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue