Closed piotr-serafin-red closed 2 years ago
I hardly believe this is a bug here. gkeep
does some fishy things here
They creates a empty sorter and only calls my scoring function but i NEED a init step that is now missing. Sooooo nothing that can be fixed here.
What they can do is not create a empty sorter but creating a generic sorter and replacing the scoring function of that but they CANT leave out my init function. It also leaves out my destroy function, which would result in a memory leak.
So yeah these two functions are essential https://github.com/nvim-telescope/telescope-fzf-native.nvim/blob/59e38e1661ffdd586cb7fc22ca0b5a05c7caf988/lua/telescope/_extensions/fzf.lua#L44-L57
Alternatively they could do
local fuzzy = conf.generic_sorter(opts)
local sorter = sorters.Sorter:new {
init = function(self)
fuzzy.init(self)
end,
destroy = function(self)
fuzzy.destroy(self)
end,
start = function(self, prompt)
fuzzy.start(self, prompt)
end,
discard = fuzzy.discard,
scoring_function = function(self, prompt, line)
fuzzy.scoring_function(self, modified_prompt, line)
end,
-- depending if they want highlighter or not
highlighter = function(self, prompt, display)
fuzzy.highlighter(self, prompt, display)
end,
}
end
This is not a issue here they just have to provide the full interface. (above might work. I havent tested it.)
Thx, closing this issue and forward info to gkeep.nvim maintainer.
Describe the bug Cannot search google keep notes with telescope, following errors (from fzf-native) are shown:
To Reproduce Steps to reproduce the behavior:
require('telescope').load_extension('gkeep')
:Telescope gkeep
Expected behavior List of notes available in Telescope window
Version information
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/0.5.1/share/nvim"
health#gkeep#check
gkeep
Additional context Configured telescope extensions
It seems that there is a problem with fzf extension. When removed (by commenting require('telescope').load_extension('fzf')) gkeep search in telescope works perfectly fine.
Screenshots![image](https://user-images.githubusercontent.com/36735331/138949093-6d06d073-5266-4b1c-8844-68d562871015.png)
Links: