nvim-telescope / telescope-fzf-native.nvim

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

health check fails with exception #91

Closed ragu-manjegowda closed 1 year ago

ragu-manjegowda commented 1 year ago

Running checkhealth gives me the following error.

Tried make clean and then make, it did not help.

telescope: require("telescope.health").check()
  ========================================================================
  ··- ERROR: Failed to run healthcheck for "telescope" plugin. Exception:
  ····function health#check, line 20
  ····Vim(eval):E5108: Error executing lua ...escope-fzf-native.nvim/lua/telescope/_extensions/fzf.lua:183: attempt to call method 'init' (a nil value)
  ····stack traceback:
  ····...escope-fzf-native.nvim/lua/telescope/_extensions/fzf.lua:183: in function 'test_sorter'
  ····...escope-fzf-native.nvim/lua/telescope/_extensions/fzf.lua:197: in function 'extension_healthcheck'
  ····.../pack/packer/opt/telescope.nvim/lua/telescope/health.lua:117: in function 'check'
  ····[string "luaeval()"]:1: in main chunk

Inside nvim :!fzf --version -> 0.35.1

In terminal $fzf --version -> 0.35.1

Neovim version 0.8.1

Operating system/version Mac Monterey (x86)

Conni2461 commented 1 year ago

your fzf version isn't necessary, because this plugin isn't using the fzf binary, its a port of the algorithm to c.

Can you share your nvim config? Like i am confused why sorter:init() isnt a valid function for you. Like sorter is some sort of interface and init is a function that the interface provides

ragu-manjegowda commented 1 year ago

Thanks for getting back, I took a closer look at the config. Removing this override_generic_sorter = false, fixes the error.

Here is the minimal config, full config here

telescope.setup({
        defaults = {
            file_sorter = require("telescope.sorters").get_fzy_sorter,
        },
        extensions = {
            fzf = {
                override_generic_sorter = false,
                override_file_sorter = true,
            },
        },
    })
Conni2461 commented 1 year ago

i pushed a fix for this. Thanks for reporting :)