summaryrefslogtreecommitdiff
path: root/lua/telescope/path.lua
diff options
context:
space:
mode:
authoranott03 <amitav_nott@ryecountryday.org>2021-07-14 13:25:00 -0400
committerGitHub <noreply@github.com>2021-07-14 19:25:00 +0200
commitdf579bac425e4b6b69a0c8e694b154610cd5420b (patch)
treefc4eb1bcbeeabe199bd997757bd72892fb4c07a0 /lua/telescope/path.lua
parenta4896e5ef39a8006a8251d48d4cf24aac81a4f94 (diff)
refactor: move from telescope.path to plenary.path (#473)
This will deprecate telescope.path, we will remove it soon. Please move over to plenary.path Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
Diffstat (limited to 'lua/telescope/path.lua')
-rw-r--r--lua/telescope/path.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua
index 0d17c1a..f69fca6 100644
--- a/lua/telescope/path.lua
+++ b/lua/telescope/path.lua
@@ -1,6 +1,7 @@
+local log = require('telescope.log')
+
local path = {}
--- TODO: Can we use vim.loop for this?
path.separator = package.config:sub(1, 1)
path.home = vim.fn.expand("~")
@@ -86,4 +87,9 @@ path.read_file_async = function(filepath, callback)
end)
end
-return path
+return setmetatable({}, {
+ __index = function(_, k)
+ log.error("telescope.path is deprecated. please use plenary.path instead")
+ return path[k]
+ end
+})