nvim-telescope / telescope-fzf-native.nvim

FZF sorter for telescope written in c
1.34k stars 46 forks source link

Failed to run 'conifig' for telescope.nvim "fzf" extension is not installed: ....nvim [Windows](11) #128

Open SaiNikhil1258 opened 1 month ago

SaiNikhil1258 commented 1 month ago

Failed to run configfor telescope.nvim                                                                                                                                             ...a/lazy/telescope.nvim/lua/telescope/_extensions/init.lua:10: 'fzf' extension doesn't exist or isn't installed: ...nvim-data/lazy/teles             cope-fzf-native.nvim/lua/fzf_lib.lua:11: cannot load module 'C:/Users/LENOVO/AppData/Local/nvim-data/lazy/telescope-fzf-native.nvim/lua/.             ./build/libfzf.dll': %1 is not a valid Win32 application.^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/plugins/telescope.lua:57 _in_ **config**   

my code

 extensions = {
     fzf = {
        fuzzy = true,                    -- false will only do exact matching
        override_generic_sorter = true,  -- override the generic sorter
        override_file_sorter = true,     -- override the file sorter
        case_mode = "smart_case",        -- or "ignore_case" or "respect_case"
                                         -- the default case_mode is "smart_case"
      }
    }

  })
  require('telescope').load_extension('fzf')

when i add the extension telescope-fzf-native.nvim make is not able to find the config files and getting this issue when i remove this extension then telescope does work fine with all of its functionality Screenshot 2024-05-26 171830

venom-10 commented 1 month ago

did you fixed that?

SaiNikhil1258 commented 1 month ago

No, I have just switched to wsl2

a-roy commented 3 weeks ago

I got it working by changing the lazy.nvim plugin spec to:

{
  'nvim-telescope/telescope-fzf-native.nvim',
  build = function(plugin)
    local obj = vim.system({'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release'}, {cwd = plugin.dir}):wait()
    if obj.code ~= 0 then error(obj.stderr) end
    obj = vim.system({'cmake', '--build', 'build', '--config', 'Release'}, {cwd = plugin.dir}):wait()
    if obj.code ~= 0 then error(obj.stderr) end
    obj = vim.system({'cmake', '--install', 'build', '--prefix', 'build'}, {cwd = plugin.dir}):wait()
    if obj.code ~= 0 then error(obj.stderr) end
  end
}

The suggested method of supplying the shell command just didn't seem to do anything.