Neovim for Beginners — Fuzzy File Search (Part 1)
Efficient file navigation and searching are essential for developers. We are going to
- Understand existing Neovim features to help us find files efficiently.
- Configure options to help us find files efficiently without plugins.
- Configure fuzzy file finder plugins —
- Share other fuzzy finder plugins you can explore.
In later articles, we shall look into other Lua-based plugins like
This article is part of the Neovim for Beginners series.
The Neovim configuration files can be found in this repository.
Built-in File Searching
Default File Search
:set path? and we can see the value of the file search path. By default, its value is set to
This is a list of directories that will be searched when using the
:tabfind and other commands provided that the file being searched for has a relative path (not starting with
../). The directories in the
pathoption may be relative or absolute.
Given a project with the following folder structure, by default, the command only searches for files under the current and the
Configure File Search
The default file search is not so useful. Let’s fine-tune it the Lua way.
after/plugin/defaults.lua, we add the following lines to remove the
/usr/include folder from the search and add all subdirectories in the current folder to the search.