feat(renderer): add renderer.root_folder_label (#1746)
* Add new renderer setting `add_root_updir` to fix #1743. * Fix default value in docs. * Remove proposed “add_root_updir” and rename “root_folder_modifier” to “root_folder_label”. Also, “root_folder_label” can be also a function now. * chore: warn users about breaking change * fix(#1743): use silent migration of root_folder_modifier * fix(#1743): add example, document previous renderer.root_folder_modifier * Add check to validate return type of “root_folder_label” is string. * Change “root_folder_label” default value to “:~:s?$?/..?”. * Add missing keyword “local” to local variable “label”. Co-authored-by: David Aguilera <david.aguilera@neliosoftware.com> Co-authored-by: gegoune <dev@clog.rocks> Co-authored-by: Alexander Courtis <alex@courtis.org>
This commit is contained in:
@@ -294,6 +294,9 @@ local function refactored(opts)
|
||||
utils.move_missing_val(opts, "", "open_on_tab", opts, "tab.sync", "open", false)
|
||||
utils.move_missing_val(opts, "", "open_on_tab", opts, "tab.sync", "close")
|
||||
utils.move_missing_val(opts, "", "ignore_buf_on_tab_change", opts, "tab.sync", "ignore")
|
||||
|
||||
-- 2022/11/22
|
||||
utils.move_missing_val(opts, "renderer", "root_folder_modifier", opts, "renderer", "root_folder_label")
|
||||
end
|
||||
|
||||
local function removed(opts)
|
||||
@@ -304,8 +307,8 @@ local function removed(opts)
|
||||
|
||||
if opts.focus_empty_on_setup then
|
||||
notify.warn "focus_empty_on_setup has been removed and will be replaced by a new startup configuration. Please remove this option. See https://bit.ly/3yJch2T"
|
||||
opts.focus_empty_on_setup = nil
|
||||
end
|
||||
opts.focus_empty_on_setup = nil
|
||||
end
|
||||
|
||||
function M.migrate_legacy_options(opts)
|
||||
|
||||
Reference in New Issue
Block a user