Skip to content

Commit

Permalink
telescope-tabs: remove git commits and improve scala files
Browse files Browse the repository at this point in the history
  • Loading branch information
gvolpe committed Apr 3, 2024
1 parent 810b858 commit 06782a0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions modules/telescope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,15 @@ in
${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
},
append_tabs = {
{
name = "Scala files",
tele_func = function()
builtin.fd({ find_command = { "${pkgs.fd}/bin/fd", "-e", "scala" } })
end,
available = function()
local scalaFiles = vim.fn.glob("*.scala", ".") .. vim.fn.glob("*.sbt", ".")
return not (scalaFiles == "")
end
}
},
Expand Down

0 comments on commit 06782a0

Please sign in to comment.