A fast, live text search plugin for Neovim with smart filtering and beautiful highlighting. Search for words, environment variables, function names, or any text across your entire project.
- Live search - Results update as you type
- Fast search powered by ripgrep
- Smart filtering: Excludes
node_modules, build directories, minified files - Beautiful UI: Clean bottom-split interface that matches your theme
- Match highlighting: Matched text highlighted with bright colors
- Jump to location: Press Enter to jump to exact file and line
- Syntax highlighting: File paths, line numbers, and content all colored
- Find where environment variables are used:
NEXT_PUBLIC_API_URL - Search for function calls:
calculateTotal - Find TODO comments:
TODO: - Locate configuration values:
API_KEY - Track down variable usage across files
Required:
ripgrep(rg) - Ultra-fast text search tool
# Ubuntu/Debian
sudo apt install ripgrep
# Arch Linux
sudo pacman -S ripgrep
# macOS
brew install ripgrepUsing lazy.nvim
{
'enheit/mlwf',
config = function()
require('mlwf').setup({
-- Optional: customize configuration
exclude_patterns = {
'node_modules',
'.git',
'dist',
'build',
},
window_height = 15,
})
-- Set keybinding
vim.keymap.set('n', '<leader>fw', ':MLWFFind<CR>', { desc = 'Find Word' })
end,
}Using packer.nvim
use {
'enheit/mlwf',
config = function()
require('mlwf').setup()
end,
}Using vim-plug
Plug 'enheit/mlwf'
" In your init.vim or after plug#end()
lua require('mlwf').setup()Press <leader>fw (usually space + f + w) to open the word finder.
:MLWFFind " Open word finder- Type to search for text across all files
- Enter - Jump to selected match (opens file at exact line)
- Ctrl-n / Down - Next result
- Ctrl-p / Up - Previous result
- Esc - Close without selecting
- j/k (normal mode) - Navigate results
require('mlwf').setup({
-- Directories/patterns to exclude from search
exclude_patterns = {
'node_modules',
'.git',
'dist',
'build',
'target',
'.next',
'coverage',
'*.min.js',
'*.min.css',
},
-- Height of the finder window (in lines)
window_height = 15,
})
-- Set keybinding
vim.keymap.set('n', '<leader>fw', ':MLWFFind<CR>', { desc = 'Find Word' })require('mlwf').setup({
-- your config here
})
-- Use any keybinding you prefer
vim.keymap.set('n', '<C-f>', ':MLWFFind<CR>', { desc = 'Find word' })require('mlwf').setup({
exclude_patterns = {
'node_modules',
'.git',
'vendor', -- Add vendor directory
'*.pyc', -- Add Python bytecode
'__pycache__', -- Add Python cache
'*.lock', -- Add lock files
},
})- Text search: Uses
ripgrepto search file contents - Smart filtering: Automatically excludes common build/dependency directories
- Live updates: Results update with ~200ms debounce as you type
- Display format:
path/to/file.ts:42 - const API = NEXT_PUBLIC_MY_ENV - Match highlighting: Your search term is highlighted in bright colors
- Jump to match: Opens file and positions cursor at the exact line and column
NEXT_PUBLIC → Find all environment variables
TODO: → Find all TODO comments
calculateTotal → Find function usage
API_KEY → Find configuration values
import React → Find React imports
MLWF is designed to work alongside:
- MLFS - My Lovely File Selector (find files by name)
- MLTS - My Lovely Theme Selector
- MLTB - My Lovely Theme Builder
All plugins follow the same naming convention, code style, and theme integration.
You can customize colors by setting these highlight groups:
vim.api.nvim_set_hl(0, 'MLWFSelection', { link = 'CursorLine' }) -- Selected line
vim.api.nvim_set_hl(0, 'MLWFMatch', { link = 'IncSearch' }) -- Matched text
vim.api.nvim_set_hl(0, 'MLWFPath', { link = 'Directory' }) -- File path
vim.api.nvim_set_hl(0, 'MLWFLineNr', { link = 'LineNr' }) -- Line number- Ripgrep is extremely fast - can search millions of lines in seconds
- Debounced search - Waits 200ms after you stop typing before searching
- Limited results - Shows max 100 results for UI performance
- Smart exclude - Skips
node_modulesand build directories automatically
MIT
- Built with ripgrep for blazing fast search
- Inspired by Telescope, fzf.vim, and grep.vim
- Part of the "My Lovely" plugin family