diff options
| author | Simon Hauser <Simon-Hauser@outlook.de> | 2020-12-09 21:46:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-09 15:46:41 -0500 |
| commit | 141dc6d55e4f53ee9527adc164a0d39725394bfd (patch) | |
| tree | 335457a78d554327a7c9e550118c84a7c283a059 /lua/telescope/path.lua | |
| parent | c276db06e2981416995450a4198cef4b87170f6f (diff) | |
ci: Add luacheck ci job (#317)
* Add luacheck ci job
* Fix most of the linting issues
* fixup: lint
Co-authored-by: TJ DeVries <devries.timothyj@gmail.com>
Diffstat (limited to 'lua/telescope/path.lua')
| -rw-r--r-- | lua/telescope/path.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lua/telescope/path.lua b/lua/telescope/path.lua index cdfbc48..0a47a83 100644 --- a/lua/telescope/path.lua +++ b/lua/telescope/path.lua @@ -4,7 +4,6 @@ local path = {} path.separator = package.config:sub(1, 1) path.home = vim.fn.expand("~") - path.make_relative = function(filepath, cwd) if not cwd or not filepath then return filepath end @@ -83,14 +82,14 @@ path.read_file = function(filepath) end path.read_file_async = function(filepath, callback) - vim.loop.fs_open(filepath, "r", 438, function(err, fd) - assert(not err, err) - vim.loop.fs_fstat(fd, function(err, stat) - assert(not err, err) - vim.loop.fs_read(fd, stat.size, 0, function(err, data) - assert(not err, err) - vim.loop.fs_close(fd, function(err) - assert(not err, err) + vim.loop.fs_open(filepath, "r", 438, function(err_open, fd) + assert(not err_open, err_open) + vim.loop.fs_fstat(fd, function(err_fstat, stat) + assert(not err_fstat, err_fstat) + vim.loop.fs_read(fd, stat.size, 0, function(err_read, data) + assert(not err_read, err_read) + vim.loop.fs_close(fd, function(err_close) + assert(not err_close, err_close) return callback(data) end) end) |
