File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -303,14 +303,27 @@ end
303303```
304304
305305``` lua
306- local run = a .sync (function ()
306+ a .sync (function ()
307307 -- do something in other loop
308308 a .wait (main_loop )
309309 -- you are back!
310- end )
310+ end )()
311311```
312312
313313
314- ## Practice !
314+ ## Plugin !
315315
316316I have bundle up this tutorial as a vim plugin, you can install it the usual way.
317+
318+ ` Plug 'ms-jpq/neovim_async_tutorial' `
319+
320+ and then call the test functions like so:
321+
322+ ` :LuaAsyncExample `
323+
324+ ` :LuaSyncExample `
325+
326+ ` :LuaTextlockFail `
327+
328+ ` :LuaTextLockSucc `
329+
Original file line number Diff line number Diff line change 105105
106106
107107local vim_command = function ()
108+ vim .api .nvim_command [[ echom 'calling vim command']]
108109end
109110
110111
You can’t perform that action at this time.
0 commit comments