From b27cb583c3185cc9a91f0bcb173b55ae461101c3 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Fri, 3 Jan 2025 09:09:55 -0800 Subject: [PATCH] chore: deprecated opt message for `global_xxx` Picker global defaults should be defined in the `defaults` table instead, e.g: ```lua require("fzf-lua").setup({ defaults = { file_icons = false, git_icons = false } }) ``` --- lua/fzf-lua/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/fzf-lua/init.lua b/lua/fzf-lua/init.lua index db0bb73d..452dc8d9 100644 --- a/lua/fzf-lua/init.lua +++ b/lua/fzf-lua/init.lua @@ -208,6 +208,8 @@ function M.setup(opts, do_not_reset_defaults) opts.defaults = opts.defaults or {} opts.defaults[o] = opts[gopt] opts[gopt] = nil + utils.warn(string.format("Deprecated option: '%s = %s' -> 'defaults = { %s = %s }'", + gopt, tostring(opts.defaults[o]), o, tostring(opts.defaults[o]))) end end -- set custom   if caller requested