Skip to content

Commit

Permalink
chore: deprecated opt message for global_xxx
Browse files Browse the repository at this point in the history
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 }
})
```
  • Loading branch information
ibhagwan committed Jan 3, 2025
1 parent c773fab commit b27cb58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/fzf-lua/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 &nbsp if caller requested
Expand Down

0 comments on commit b27cb58

Please sign in to comment.