mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
chore(config): nvim: telescope file finding and preview
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
@@ -111,7 +111,7 @@ local lazy_plugins = function()
|
||||
return require('telescope').extensions.lazy_plugins.lazy_plugins()
|
||||
end
|
||||
|
||||
K.nl('f', ':Telescope fd --hidden=true<cr>', 'Find Files')
|
||||
K.nl('f', ':Telescope find_files<cr>', 'Find Files')
|
||||
K.nl(',', ':Telescope buffers<cr>', 'Find existing buffers')
|
||||
K.nl('/', function() fuzzy_search() end, 'Fuzzily search in current buffer')
|
||||
|
||||
|
||||
@@ -37,15 +37,18 @@ return {
|
||||
local vimgrep_arguments = { unpack(c.values.vimgrep_arguments) }
|
||||
|
||||
-- I want to search in hidden/dot files.
|
||||
table.insert(vimgrep_arguments, '--hidden')
|
||||
-- I don't want to search in the `.git` directory.
|
||||
table.insert(vimgrep_arguments, '--hidden=true')
|
||||
table.insert(vimgrep_arguments, '--glob')
|
||||
-- I don't want to search in the `.git` directory.
|
||||
table.insert(vimgrep_arguments, '!**/.git/*')
|
||||
|
||||
-- [[ Configure Telescope ]]
|
||||
-- See `:help telescope` and `:help telescope.setup()`
|
||||
t.setup {
|
||||
defaults = {
|
||||
preview = {
|
||||
filesize_limit = 0.1, -- MB
|
||||
},
|
||||
-- `hidden = true` is not supported in text grep commands.
|
||||
vimgrep_arguments = vimgrep_arguments,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user