Skip to content

Commit

Permalink
telescope: add git-commits tab to search
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Jan 30, 2024
1 parent aaa459b commit 046e158
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ in
require("telescope").load_extension("media_files")
''}
${writeIf cfg.tabs.enable ''
local builtin = require('telescope.builtin')
require("search").setup({
append_tabs = { -- append_tabs will add the provided tabs to the default ones
{
"Commits", -- or name = "Commits"
builtin.git_commits, -- or tele_func = require('telescope.builtin').git_commits
available = function() -- optional
return vim.fn.isdirectory(".git") == 1
end
}
},
})
''}
require("telescope").setup {
defaults = {
vimgrep_arguments = {
Expand Down

0 comments on commit 046e158

Please sign in to comment.