add Gitignore (#251)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
local M = {}
|
||||
local uv = vim.loop -- or require("luv") ? i dont understand
|
||||
local api = vim.api
|
||||
|
||||
function M.path_to_matching_str(path)
|
||||
@@ -11,6 +12,16 @@ function M.echo_warning(msg)
|
||||
api.nvim_command('echohl None')
|
||||
end
|
||||
|
||||
function M.read_file(path)
|
||||
local fd = uv.fs_open(path, "r", 438)
|
||||
if not fd then return '' end
|
||||
local stat = uv.fs_fstat(fd)
|
||||
if not stat then return '' end
|
||||
local data = uv.fs_read(fd, stat.size, 0)
|
||||
uv.fs_close(fd)
|
||||
return data or ''
|
||||
end
|
||||
|
||||
local path_separator = package.config:sub(1,1)
|
||||
function M.path_join(paths)
|
||||
return table.concat(paths, path_separator)
|
||||
|
||||
Reference in New Issue
Block a user