22 lines
423 B
Lua
22 lines
423 B
Lua
local M = {}
|
|
|
|
function M.get_clipboard_content()
|
|
return vim.fn.getreg('+')
|
|
end
|
|
|
|
function M.write_file(filepath, content)
|
|
local fd = vim.loop.fs_open(filepath, "w", 438)
|
|
if not fd then
|
|
vim.api.nvim_err_writeln("Could not open file for writing: " .. filepath)
|
|
return
|
|
end
|
|
vim.loop.fs_write(fd, content, -1)
|
|
vim.loop.fs_close(fd)
|
|
end
|
|
|
|
function M.finish()
|
|
print("Finished processing files.")
|
|
end
|
|
|
|
return M
|