micro/runtime
Dmytro Maluka 9089e9ec83 Add micro's own lua timer function micro.After()
Directly using Go's time.AfterFunc() from lua is tricky. First, it
requires the lua timer callback to explicitly lock ulua.Lock to prevent
races. Second, it requires the lua timer callback to explicitly redraw
the screen if the callback changes the screen contents (see #2923).

So instead provide micro's own timer API which ensures both
synchronization and redrawing on its own, instead of leaving this burden
to lua code. In fact, its implementation runs the lua timer callback in
the main micro's goroutine (i.e. from micro's perspective it is
synchronous, not asynchronous), so both redrawing and synchronization
are ensured automatically.

Fixes #2923
2024-03-14 04:52:59 +01:00
..
colorschemes Add tab-error and trailingws colors to colorschemes 2024-03-14 03:18:10 +01:00
help Add micro's own lua timer function micro.After() 2024-03-14 04:52:59 +01:00
plugins hltrailingws: adjust autoclose plugin implementation 2024-03-14 03:10:33 +01:00
syntax Add main tag to html syntax highlighting (#2999) 2024-03-13 21:12:38 +01:00
README.md Update syntax readme and docs 2017-03-26 18:58:08 -04:00
runtime.go refactor(runtime): simplify AssetDir() (#2761) 2023-02-28 01:31:51 -08:00
runtime_test.go refactor(runtime): simplify AssetDir() (#2761) 2023-02-28 01:31:51 -08:00

Runtime files for Micro

This directory will be embedded in the Go binary for portability, but it may just as well be put in ~/.config/micro. If you would like to make your own colorschemes and syntax files, you can put them in ~/.config/micro/colorschemes and ~/.config/micro/syntax respectively.