tom-anders / telescope-vim-bookmarks.nvim

Integrates vim-bookmarks into telescope.nvim
MIT License
114 stars 23 forks source link

Commands not working after recent telescope update #15

Closed yalikebaz closed 2 years ago

yalikebaz commented 2 years ago

The usage commands from the README are broken, for example :Telescope vim_bookmarks all shows the error: Error executing Lua callback: ...okmarks.nvim/lua/telescope/_extensions/vim_bookmarks.lua:45: attempt to call field 'get_default' (a nil value).

The commands were working but I think a recent update to Telescope may have affected something, so this is no longer working.

yichenshen commented 2 years ago

get_default was removed in https://github.com/nvim-telescope/telescope.nvim/pull/2063 it seems. Proposed a simple fix in #16 to use vim.F.if_nil instead, which does the same thing.

One way to workaround without custom patches to the plugin itself is to patch the function back into telescope via init.lua:

require('telescope.utils').get_default = vim.F.if_nil