[telescope] remove gitfiles from the default files tab
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
|
||||
"plenary": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||
"vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" },
|
||||
|
||||
@@ -1,18 +1,34 @@
|
||||
return {
|
||||
"FabianWirth/search.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
|
||||
version = "0.1.6",
|
||||
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim"
|
||||
},
|
||||
|
||||
config = function()
|
||||
require('telescope').setup({})
|
||||
|
||||
local search = require('search')
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
|
||||
vim.keymap.set('n', '<C-p>', builtin.git_files, {})
|
||||
|
||||
search.setup({
|
||||
mappings = { -- optional: configure the mappings for switching tabs (will be set in normal and insert mode(!))
|
||||
next = '<Tab>',
|
||||
prev = '<S-Tab>'
|
||||
},
|
||||
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
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set('n', '<leader>pf', search.open, {})
|
||||
vim.keymap.set('n', '<leader>pws', function()
|
||||
local word = vim.fn.expand("<cword>")
|
||||
builtin.grep_string({ search = word })
|
||||
@@ -27,4 +43,3 @@ return {
|
||||
vim.keymap.set('n', '<leader>vh', builtin.help_tags, {})
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user