From a7ee814f0d777c50c1dcb22ade454f88eb750051 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Tue, 26 Mar 2024 08:16:07 +0530 Subject: [PATCH] fix!: deprecate configuring plugin via telescope extension --- lua/telescope/_extensions/bookmarks.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lua/telescope/_extensions/bookmarks.lua b/lua/telescope/_extensions/bookmarks.lua index d4fa0c2..b23fe13 100644 --- a/lua/telescope/_extensions/bookmarks.lua +++ b/lua/telescope/_extensions/bookmarks.lua @@ -104,7 +104,15 @@ end return telescope.register_extension { setup = function(ext_config) - browser_bookmarks.setup(ext_config) + if ext_config and not vim.tbl_isempty(ext_config) then + utils.warn( + "Configuring the plugin using the telescope extension is deprecated." + .. "Please use the `setup` function from the main module:\n\n" + .. ("require('browser_bookmarks').setup(%s)"):format( + vim.inspect(ext_config) + ) + ) + end end, exports = { bookmarks = bookmarks,