From 750a94baefc2898995d5150b5c76fadb28388515 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Wed, 12 Jan 2022 22:34:28 +0600 Subject: [PATCH] chore: remove older deprecation notices --- BREAKING_CHANGES.md | 6 ++++++ lua/lualine/utils/loader.lua | 39 ------------------------------------ 2 files changed, 6 insertions(+), 39 deletions(-) diff --git a/BREAKING_CHANGES.md b/BREAKING_CHANGES.md index 6946463..e58412d 100644 --- a/BREAKING_CHANGES.md +++ b/BREAKING_CHANGES.md @@ -89,3 +89,9 @@ function my_comp:init(options) end ``` +### Type option(luae & vimf) rename +These were hard to understand before. Now the name should convey more info. + +- luae -> lua_expr +- vimf -> vim_fun + diff --git a/lua/lualine/utils/loader.lua b/lua/lualine/utils/loader.lua index 3821da5..6b18e8c 100644 --- a/lua/lualine/utils/loader.lua +++ b/lua/lualine/utils/loader.lua @@ -90,44 +90,6 @@ component type '%s' isn't recognised. Check if spelling is correct.]], end end -local function option_deprecatation_notice(component) - local types = { - type_name = function() - local changed_to = component.type == 'luae' and 'lua_expr' or 'vim_fun' - modules.notice.add_notice(string.format( - [[ -### option.type.%s - -type name `%s` has been deprecated. -Please use `%s`. - -You have some thing like this in your config config for %s component: - -```lua - type = %s, -``` - -You'll have to change it to this to retain old behavior: - -```lua - type = %s -``` -]], - component.type, - component.type, - changed_to, - tostring(component[1]), - component.type, - changed_to - )) - component.type = changed_to - end, - } - if component.type == 'luae' or component.type == 'vimf' then - types.type_name() - end -end - --- Shows notice about invalid types passed as component --- @param index number the index of component jn section table --- @param component table containing component elements @@ -182,7 +144,6 @@ local function load_sections(sections, options) component.self.section = section_name -- apply default args component = vim.tbl_extend('keep', component, options) - option_deprecatation_notice(component) section[index] = component_loader(component) end end