Hi all, I’m trying to change my autocommands, with the Lua version, and I found some simple vimscript code that I don’t know how to do it in Lua.
I have a function that reads a template file into the buffer with a simple
read <filename> command. How do you do that in Lua?
I believe that you can do it with
vim.api.nvim_buf_set_lines to write on the buffer, but how do you get the file content on the first place? Is there a simple way to do it? (with the API) or you have to use io.open?