api: allow open non-current buffer as terminal (+ xmas bonus)

vim.api.nvim_chan_send(vim.api.nvim_open_term(0), io.open("/path/to/smile.cat", "r"):read("*a"))
This commit is contained in:
Björn Linse
2020-12-20 16:52:01 +01:00
parent 097ec71bd8
commit ed08936987
8 changed files with 236 additions and 26 deletions

View File

@@ -25,7 +25,7 @@ local gperfpipe = io.open(funcsfname .. '.gperf', 'wb')
local funcs = require('eval').funcs
local metadata = mpack.unpack(io.open(metadata_file, 'rb'):read("*all"))
for _,fun in ipairs(metadata) do
if not (fun.remote_only or fun.lua_only) then
if fun.eval then
funcs[fun.name] = {
args=#fun.parameters,
func='api_wrapper',