Skip to content

Commit 4606d01

Browse files
committed
Update readme
Signed-off-by: Aaron Hallaert <[email protected]>
1 parent 9a2c49f commit 4606d01

File tree

1 file changed

+123
-127
lines changed

1 file changed

+123
-127
lines changed

README.md

Lines changed: 123 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Advanced Git Search
1+
# 🍃 Advanced Git Search
22

33
An advanced git search extension for `Telescope` and `fzf-lua`.
44

@@ -178,156 +178,152 @@ Enable `show_builtin_git_pickers` to additionally show builtin git pickers.
178178

179179
## ⚙️ Installation
180180

181+
### Config
182+
183+
```lua
184+
{
185+
-- fugitive or diffview
186+
diff_plugin = "fugitive",
187+
-- customize git in previewer
188+
-- e.g. flags such as { "--no-pager" }, or { "-c", "delta.side-by-side=false" }
189+
git_flags = {},
190+
-- customize git diff in previewer
191+
-- e.g. flags such as { "--raw" }
192+
git_diff_flags = {},
193+
-- Show builtin git pickers when executing "show_custom_functions" or :AdvancedGitSearch
194+
show_builtin_git_pickers = false,
195+
196+
-- Telescope layout setup
197+
telescope_theme = {
198+
function_name_1 = {
199+
-- Theme options
200+
},
201+
function_name_2 = "dropdown"
202+
-- e.g. realistic example
203+
show_custom_functions = {
204+
layout_config = { width = 0.4, height = 0.4 },
205+
},
206+
207+
}
208+
}
209+
```
210+
211+
### Dependencies
212+
213+
```lua
214+
{
215+
"nvim-telescope/telescope.nvim",
216+
-- to show diff splits and open commits in browser
217+
"tpope/vim-fugitive",
218+
-- to open commits in browser with fugitive
219+
"tpope/vim-rhubarb",
220+
-- optional: to replace the diff from fugitive with diffview.nvim
221+
-- (fugitive is still needed to open in browser)
222+
-- "sindrets/diffview.nvim",
223+
}
224+
```
225+
226+
181227
### Telescope
182228

183-
With Lazy
229+
<details>
230+
<summary>Lazy</summary>
231+
To complete this snippet, see [Config](#Config) and [Dependencies](#Dependencies).
184232

185233
```lua
186-
{
187-
"aaronhallaert/advanced-git-search.nvim",
188-
config = function()
189-
-- optional: setup telescope before loading the extension
190-
require("telescope").setup{
191-
-- move this to the place where you call the telescope setup function
192-
extensions = {
193-
advanced_git_search = {
194-
-- fugitive or diffview
195-
diff_plugin = "fugitive",
196-
-- customize git in previewer
197-
-- e.g. flags such as { "--no-pager" }, or { "-c", "delta.side-by-side=false" }
198-
git_flags = {},
199-
-- customize git diff in previewer
200-
-- e.g. flags such as { "--raw" }
201-
git_diff_flags = {},
202-
-- Show builtin git pickers when executing "show_custom_functions" or :AdvancedGitSearch
203-
show_builtin_git_pickers = false,
234+
{
235+
"aaronhallaert/advanced-git-search.nvim",
236+
config = function()
237+
-- optional: setup telescope before loading the extension
238+
require("telescope").setup{
239+
-- move this to the place where you call the telescope setup function
240+
extensions = {
241+
advanced_git_search = {
242+
-- See Config
204243
}
205-
}
206244
}
207-
208-
require("telescope").load_extension("advanced_git_search")
209-
end,
210-
dependencies = {
211-
"nvim-telescope/telescope.nvim",
212-
-- to show diff splits and open commits in browser
213-
"tpope/vim-fugitive",
214-
-- to open commits in browser with fugitive
215-
"tpope/vim-rhubarb",
216-
-- OPTIONAL: to replace the diff from fugitive with diffview.nvim
217-
-- (fugitive is still needed to open in browser)
218-
-- "sindrets/diffview.nvim",
219-
},
220-
}
245+
}
246+
247+
require("telescope").load_extension("advanced_git_search")
248+
end,
249+
dependencies = {
250+
--- See dependencies
251+
},
252+
}
221253
```
254+
</details>
255+
256+
<details>
257+
<summary>Packer</summary>
222258

223-
With Packer
259+
To complete this snippet, see [Config](#Config) and [Dependencies](#Dependencies).
224260

225261
```lua
226-
use({
227-
"aaronhallaert/advanced-git-search.nvim",
228-
config = function()
229-
-- optional: setup telescope before loading the extension
230-
require("telescope").setup{
231-
-- move this to the place where you call the telescope setup function
232-
extensions = {
233-
advanced_git_search = {
234-
-- Fugitive or diffview
235-
diff_plugin = "fugitive",
236-
-- Customize git in previewer
237-
-- e.g. flags such as { "--no-pager" }, or { "-c", "delta.side-by-side=false" }
238-
git_flags = {},
239-
-- Customize git diff in previewer
240-
-- e.g. flags such as { "--raw" }
241-
git_diff_flags = {},
242-
-- Show builtin git pickers when executing "show_custom_functions" or :AdvancedGitSearch
243-
show_builtin_git_pickers = false,
244-
}
262+
use({
263+
"aaronhallaert/advanced-git-search.nvim",
264+
config = function()
265+
-- optional: setup telescope before loading the extension
266+
require("telescope").setup{
267+
-- move this to the place where you call the telescope setup function
268+
extensions = {
269+
advanced_git_search = {
270+
-- Insert Config here
245271
}
246272
}
247-
248-
require("telescope").load_extension("advanced_git_search")
249-
end,
250-
requires = {
251-
"nvim-telescope/telescope.nvim",
252-
-- to show diff splits and open commits in browser
253-
"tpope/vim-fugitive",
254-
-- to open commits in browser with fugitive
255-
"tpope/vim-rhubarb",
256-
-- optional: to replace the diff from fugitive with diffview.nvim
257-
-- (fugitive is still needed to open in browser)
258-
-- "sindrets/diffview.nvim",
259-
},
260-
})
273+
}
274+
275+
require("telescope").load_extension("advanced_git_search")
276+
end,
277+
requires = {
278+
-- Insert Dependencies here
279+
},
280+
})
261281
```
282+
</details>
262283

263284
### Fzf-lua
264285

265-
With Lazy
286+
<details>
287+
<summary>Lazy</summary>
288+
To complete this snippet, see [Config](#Config) and [Dependencies](#Dependencies).
266289

267290
```lua
268-
{
269-
"aaronhallaert/advanced-git-search.nvim",
270-
config = function()
271-
-- optional: setup telescope before loading the extension
272-
require("advanced_git_search.fzf").setup{
273-
-- fugitive or diffview
274-
diff_plugin = "fugitive",
275-
-- customize git in previewer
276-
-- e.g. flags such as { "--no-pager" }, or { "-c", "delta.side-by-side=false" }
277-
git_flags = {},
278-
-- customize git diff in previewer
279-
-- e.g. flags such as { "--raw" }
280-
git_diff_flags = {},
281-
-- Show builtin git pickers when executing "show_custom_functions" or :AdvancedGitSearch
282-
show_builtin_git_pickers = false,
283-
}
284-
end,
285-
dependencies = {
286-
"ibhagwan/fzf-lua",
287-
-- to show diff splits and open commits in browser
288-
"tpope/vim-fugitive",
289-
-- to open commits in browser with fugitive
290-
"tpope/vim-rhubarb",
291-
-- OPTIONAL: to replace the diff from fugitive with diffview.nvim
292-
-- (fugitive is still needed to open in browser)
293-
-- "sindrets/diffview.nvim",
294-
},
295-
}
291+
{
292+
"aaronhallaert/advanced-git-search.nvim",
293+
config = function()
294+
require("advanced_git_search.fzf").setup{
295+
-- Insert Config here
296+
}
297+
end,
298+
dependencies = {
299+
-- Insert Dependencies here
300+
},
301+
}
296302
```
303+
304+
</details>
305+
306+
<details>
307+
<summary>Packer</summary>
297308

298-
With Packer
309+
To complete this snippet, see [Config](#Config) and [Dependencies](#Dependencies).
299310

300311
```lua
301-
use({
302-
"aaronhallaert/advanced-git-search.nvim",
303-
config = function()
304-
-- optional: setup telescope before loading the extension
305-
require("advanced_git_search.fzf").setup{
306-
-- Fugitive or diffview
307-
diff_plugin = "fugitive",
308-
-- Customize git in previewer
309-
-- e.g. flags such as { "--no-pager" }, or { "-c", "delta.side-by-side=false" }
310-
git_flags = {},
311-
-- Customize git diff in previewer
312-
-- e.g. flags such as { "--raw" }
313-
git_diff_flags = {},
314-
-- Show builtin git pickers when executing "show_custom_functions" or :AdvancedGitSearch
315-
show_builtin_git_pickers = false,
316-
}
312+
use({
313+
"aaronhallaert/advanced-git-search.nvim",
314+
config = function()
315+
require("advanced_git_search.fzf").setup{
316+
-- Insert Config here
317317
}
318-
end,
319-
requires = {
320-
"ibhagwan/fzf-lua",
321-
-- to show diff splits and open commits in browser
322-
"tpope/vim-fugitive",
323-
-- to open commits in browser with fugitive
324-
"tpope/vim-rhubarb",
325-
-- optional: to replace the diff from fugitive with diffview.nvim
326-
-- (fugitive is still needed to open in browser)
327-
-- "sindrets/diffview.nvim",
328-
},
329-
})
318+
}
319+
end,
320+
requires = {
321+
-- Insert Dependencies here
322+
},
323+
})
330324
```
325+
</details>
326+
331327

332328
### Prerequisites
333329

0 commit comments

Comments
 (0)