What did i do wrong with my neovim telescope config

3.6k views Asked by At

I am getting the following error when i first open neovim in my powershell 7. Can you let me know what im doing wrong? I'm using Lazy package manager, and running check health for telescope works and shows all "Ok".

Error Message:

Failed to run config for telescope.nvim ...a/lazy/telescope.nvim/lua/telescope/_extensions/init.lua:10: 'fzf' extension doesn't >exist or isn't installed: ...nvim-data/lazy/telescope-fzf-native.nvim/lua/fzf_lib.lua:11: ?>cannot load module 'C:/Users/{ME}/AppData/Local/nvim-data/lazy/telescope-fzf->native.nvim/lua/../build/libfzf.dll': The specified module could not be found.^M

stacktrace:

  • telescope.nvim\lua\telescope_extensions\init.lua:10 in load_extension
  • telescope.nvim\lua\telescope_extensions\init.lua:62 in load_extension
  • lua/{ME}/plugins/telescope.lua:25 in config
  • lua/{ME}/lazy.lua:14
  • init.lua:4

Telescope.lua

return {
'nvim-telescope/telescope.nvim', tag = '0.1.4',
dependencies = { 
    'nvim-lua/plenary.nvim',
{'nvim-telescope/telescope-fzf-native.nvim', build = "make" },
    "nvim-tree/nvim-web-devicons",
},
config = function() 
local telescope = require("telescope")
    local actions = require("telescope.actions")

    telescope.setup({
    defaults = {
    path_display = { "truncate "},
    mappings = {
    i = {
    ["<C-k>"] = actions.move_selection_previous,
    ["<C-j>"] = actions.move_selection_next,
    ["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist,
    },
    },
    },
})

telescope.load_extension("fzf")

local keymap = vim.keymap 

keymap.set("n", "<leader>ff", "<cmd>Telescope find_files<cr>", {desc = "Fuzz find files in cwd" })
keymap.set("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "Fuzzy find recent files" })
    keymap.set("n", "<leader>fs", "<cmd>Telescope live_grep<cr>", { desc = "Find string in cwd" })
    keymap.set("n", "<leader>fc", "<cmd>Telescope grep_string<cr>", { desc = "Find string under cursor in cwd" })
end,

}
2

There are 2 answers

3
btolsen131 On

Answering myself after figuring this out incase other windows users run into this issue. Credit to Some_Derpy_Pineapple on reddit for the help.

I had to navigate to my nvim-data file. Mine was at C:\Users\{user}\AppData\Local\nvim-data.

Once inside that folder, navigate to lazy\telescope-fzf-native.nvim\.

From the command line or powershell run make in the directory above. My issue was that i had a build directory already so make wasnt working. I deleted the build directory re-ran make, and then my issue went away.

0
winvicta On

I ran into exactly the same problem. Apparently the "Ok" refers to the script but not the fzf-native exe, which requires a "make". Other than the posted answer, which I have not tried, you can, while in nvim with Lazy, do ":Lazy" to bring up Lazy.nvim. Then go down to the offending item, hit CR so that you can see what's going on, and hit gb to manually trigger the build. This solution was provided by none other than folke himself, and can be found here: https://www.reddit.com/r/neovim/comments/10nzgdx/im_trying_to_set_up_telescope_with_fzfnative_and/