For when the lsp fails to identify modules in your codebase. Quickly search for modules and add the import statement to your buffer.
Depends on fzf-lua to extend upon.
Screen.Recording.2025-01-30.at.3.50.06.pm.mov
Screen.Recording.2025-01-30.at.3.50.28.pm.mov
Install ripgrep.
Using Lazy:
{
'mattpatterson94/fzf-lua-import.nvim',
dependencies = { "ibhagwan/fzf-lua" },
opts = {
...
},
},
- JavaScript
- Typescript
fzf-lua-import.nvim
requires no configuration out of the box, but you can tweak it in the following ways:
require("fzf-lua-import").setup()
-- perform a live grep for import
:FzfImport live_grep
-- search for the word under the cursor
:FzfImport grep_cword
<leader>ci - live grep
<leader>cI - grep_cword