Neovim for Beginners — Fuzzy File Search (Part 2)
We learned how to search for files efficiently with and without plugins. In this second part of fuzzy searching, we are going to
- Configure
Telescope
which is a highly extendable Lua-based fuzzy finder. - Configure extensions to search and navigate projects. With this, we can manage all our projects without leaving Neovim.
- Customize the pickers to search for dotfiles, and skip any binary or large files.
- Customize the file pickers and use a custom action to yank the full file path.
- Change the default theme, and customize the theme to fit our needs.
For Part 1, check out this article.
This article is part of the Neovim for Beginners series.
The Neovim configuration files can be found in this repository.
Basic Setup
Let’s start with a basic installation of the plugin.
Installation
In the lua/plugins.lua
file, add the following lines.
- We configure
Telescope
as an optional plugin, and specify the command, module, and keys to load the plugin. Check out the plugin management article if you are not sure what this means. plenary.nvim
andpopup.nvim
contain the Lua modules and functions needed byTelescope
. The plugins are also used by many other plugins.telescope-fzf-native.nvim
is a sorter extension that provides a native FZF sorter that uses compiled C to do matching. For better performance, we should install either thefzf
orfzy
sorter extension.telescope-project.nvim
is an extension that allows us to switch between projects easily.telescope-repo.nvim
is an extension that searches the file system for Git repositories.