Skip to content

Commit 180d3e6

Browse files
committed
read me
1 parent 01faac1 commit 180d3e6

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff 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

316316
I 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+

lua/tutorial.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ end
105105

106106

107107
local vim_command = function ()
108+
vim.api.nvim_command[[echom 'calling vim command']]
108109
end
109110

110111

0 commit comments

Comments
 (0)