aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/lua.txt16
-rw-r--r--runtime/doc/news.txt1
2 files changed, 17 insertions, 0 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 32e89bd237..8ae1c6dc40 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -33,6 +33,22 @@ Lua 5.1, not worry about forward-compatibility with future Lua versions. If
Nvim ever ships with Lua 5.4+, a Lua 5.1 compatibility shim will be provided
so that old plugins continue to work transparently.
+ *lua-luajit*
+Neovim is built with luajit on platforms which support it, which provides
+extra functionality. Lua code in |init.lua| and plugins can assume its presence
+on installations on common platforms. For maximum compatibility with less
+common platforms, availability can be checked using the `jit` global variable: >lua
+ if jit then
+ -- code for luajit
+ else
+ -- code for plain lua 5.1
+ end
+<
+ *lua-bit*
+In particular, the luajit "bit" extension module is _always_ available.
+A fallback implementation is included when nvim is built with PUC lua 5.1,
+and will be transparently used when `require("bit")` is invoked.
+
==============================================================================
LUA CONCEPTS AND IDIOMS *lua-concepts*
diff --git a/runtime/doc/news.txt b/runtime/doc/news.txt
index 6f505a958a..4dee958108 100644
--- a/runtime/doc/news.txt
+++ b/runtime/doc/news.txt
@@ -167,6 +167,7 @@ The following new APIs or features were added.
• |vim.treesitter.language.add()| as a new replacement for
`vim.treesitter.language.require_language`.
+• `require'bit'` is now always available |lua-bit|
==============================================================================
CHANGED FEATURES *news-changes*