aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-08-15 21:08:20 +0200
committerGitHub <noreply@github.com>2022-08-15 19:08:20 +0000
commit979592bda3d471cbe509d1166b348ffbcf66a7f3 (patch)
tree6c95885252fe9225bdb106ea56274a77307e8819 /doc
parentrefactor: introduce selene, harden type defs, and use proper EmmyLua syntax (... (diff)
downloadmason-979592bda3d471cbe509d1166b348ffbcf66a7f3.tar
mason-979592bda3d471cbe509d1166b348ffbcf66a7f3.tar.gz
mason-979592bda3d471cbe509d1166b348ffbcf66a7f3.tar.bz2
mason-979592bda3d471cbe509d1166b348ffbcf66a7f3.tar.lz
mason-979592bda3d471cbe509d1166b348ffbcf66a7f3.tar.xz
mason-979592bda3d471cbe509d1166b348ffbcf66a7f3.tar.zst
mason-979592bda3d471cbe509d1166b348ffbcf66a7f3.zip
docs: note that event handlers may be executed outside of the main loop (#297)
Diffstat (limited to 'doc')
-rw-r--r--doc/reference.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/reference.md b/doc/reference.md
index 25496863..c16f2e0e 100644
--- a/doc/reference.md
+++ b/doc/reference.md
@@ -390,6 +390,9 @@ to events on the associated object.
Registers the provided `{handler}`, to be called every time the provided
`{event}` is dispatched.
+**Note**: The provided `{handler}` may be executed outside the main Neovim loop (`:h vim.in_fast_event()`), where most of
+the Neovim API is disabled.
+
### `EventEmitter:once({event, handler})`
**Parameters:**
@@ -400,6 +403,9 @@ Registers the provided `{handler}`, to be called every time the provided
Registers the provided `{handler}`, to be called only once - the next time the
provided `{event}` is dispatched.
+**Note**: The provided `{handler}` may be executed outside the main Neovim loop (`:h vim.in_fast_event()`), where most of
+the Neovim API is disabled.
+
### `EventEmitter:off({event}, {handler})`
**Parameters:**