diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2022-05-22 12:53:37 +0200 |
|---|---|---|
| committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2022-06-30 14:01:49 +0200 |
| commit | 83b6cadb2c61b6eee6a8f0ec8bb4599c89b6ab57 (patch) | |
| tree | 9e33acbc68a154e2ddb1fca34cfa87f6f80b2904 /lua/telescope/utils.lua | |
| parent | a1aec79cb1abc5630f941bafbe83f6e00dcff316 (diff) | |
break: deprecate utils.get_default utils.if_nil (#1545)
Diffstat (limited to 'lua/telescope/utils.lua')
| -rw-r--r-- | lua/telescope/utils.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua index 7692409..07800b2 100644 --- a/lua/telescope/utils.lua +++ b/lua/telescope/utils.lua @@ -20,6 +20,7 @@ utils.get_separator = function() end utils.if_nil = function(x, was_nil, was_not_nil) + log.error "telescope.utils.if_nil is deprecated and will be removed. Please use vim.F.if_nil" if x == nil then return was_nil else @@ -28,6 +29,7 @@ utils.if_nil = function(x, was_nil, was_not_nil) end utils.get_default = function(x, default) + log.error "telescope.utils.get_default is deprecated and will be removed. Please use vim.F.if_nil" return utils.if_nil(x, default, x) end @@ -198,7 +200,7 @@ utils.path_tail = (function() end)() utils.is_path_hidden = function(opts, path_display) - path_display = path_display or utils.get_default(opts.path_display, require("telescope.config").values.path_display) + path_display = path_display or vim.F.if_nil(opts.path_display, require("telescope.config").values.path_display) return path_display == nil or path_display == "hidden" @@ -235,7 +237,7 @@ utils.transform_path = function(opts, path) return path end - local path_display = utils.get_default(opts.path_display, require("telescope.config").values.path_display) + local path_display = vim.F.if_nil(opts.path_display, require("telescope.config").values.path_display) local transformed_path = path |
