mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 17:49:09 +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()
|
return require('telescope').extensions.lazy_plugins.lazy_plugins()
|
||||||
end
|
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(',', ':Telescope buffers<cr>', 'Find existing buffers')
|
||||||
K.nl('/', function() fuzzy_search() end, 'Fuzzily search in current buffer')
|
K.nl('/', function() fuzzy_search() end, 'Fuzzily search in current buffer')
|
||||||
|
|
||||||
|
|||||||
@@ -37,15 +37,18 @@ return {
|
|||||||
local vimgrep_arguments = { unpack(c.values.vimgrep_arguments) }
|
local vimgrep_arguments = { unpack(c.values.vimgrep_arguments) }
|
||||||
|
|
||||||
-- I want to search in hidden/dot files.
|
-- I want to search in hidden/dot files.
|
||||||
table.insert(vimgrep_arguments, '--hidden')
|
table.insert(vimgrep_arguments, '--hidden=true')
|
||||||
-- I don't want to search in the `.git` directory.
|
|
||||||
table.insert(vimgrep_arguments, '--glob')
|
table.insert(vimgrep_arguments, '--glob')
|
||||||
|
-- I don't want to search in the `.git` directory.
|
||||||
table.insert(vimgrep_arguments, '!**/.git/*')
|
table.insert(vimgrep_arguments, '!**/.git/*')
|
||||||
|
|
||||||
-- [[ Configure Telescope ]]
|
-- [[ Configure Telescope ]]
|
||||||
-- See `:help telescope` and `:help telescope.setup()`
|
-- See `:help telescope` and `:help telescope.setup()`
|
||||||
t.setup {
|
t.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
|
preview = {
|
||||||
|
filesize_limit = 0.1, -- MB
|
||||||
|
},
|
||||||
-- `hidden = true` is not supported in text grep commands.
|
-- `hidden = true` is not supported in text grep commands.
|
||||||
vimgrep_arguments = vimgrep_arguments,
|
vimgrep_arguments = vimgrep_arguments,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user