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>
This commit is contained in:
anott03
2021-07-14 13:25:00 -04:00
committed by GitHub
parent a4896e5ef3
commit df579bac42
11 changed files with 100 additions and 69 deletions

View File

@@ -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
})