Problem: Installing treesitter parser is hard (harder than
climbing to heaven).
Solution: Add optional support for wasm parsers with `wasmtime`.
Notes:
* Needs to be enabled by setting `ENABLE_WASMTIME` for tree-sitter and
Neovim. Build with
`make CMAKE_EXTRA_FLAGS=-DENABLE_WASMTIME=ON
DEPS_CMAKE_FLAGS=-DENABLE_WASMTIME=ON`
* Adds optional Rust (obviously) and C11 dependencies.
* Wasmtime comes with a lot of features that can negatively affect
Neovim performance due to library and symbol table size. Make sure to
build with minimal features and full LTO.
* To reduce re-compilation times, install `sccache` and build with
`RUSTC_WRAPPER=<path/to/sccache> make ...`
Problem: Adding support for modern Nvim features (reflow, OSC 8, full
utf8/emoji support) requires coupling libvterm to Nvim internals
(e.g., utf8proc).
Solution: Vendor libvterm at v0.3.3.
Problem: Neovim bundles treesitter parsers for bash and python but does
not use them by default. This dilutes the messaging about the bundled
parsers being required for functionality or reasonable out-of-the-box
experience. It also increases the risk of query incompatibilities for no
gain.
Solution: Stop bundling bash and python parser and queries.
utf8proc contains all the data which is currently in
unicode_tables.generated.h internally, but in quite a different format.
Ideally unicode_tables.generated.h should be removed as well so we rely
solely on utf8proc. We want to avoid a situation where the possibility
of unicode mismatch occurs, e.g a distro using both unicode 12 and
unicode 13.
close#27678
Return a userdata wrapper around the uv_req_t to allow it to be garbage collected before the program exits.
Previously, the returned userdata held a reference to itself in the Lua registry, meaning it would never be able to be garbage collected until the process ended.
This reverts commit 0e4a895, which attempted a workaround for the same underlying problem, but introduced a use-after-free.
```
Application Specific Information:
abort() called
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x18cde20dc __pthread_kill + 8
1 libsystem_pthread.dylib 0x18ce19cc0 pthread_kill + 288
2 libsystem_c.dylib 0x18cd25a40 abort + 180
3 libsystem_malloc.dylib 0x18cc3cb08 malloc_vreport + 908
4 libsystem_malloc.dylib 0x18cc403f4 malloc_report + 64
5 libsystem_malloc.dylib 0x18cc54ebc find_zone_and_free + 308
6 nvim 0x100eb13b8 uv__fs_scandir_cleanup + 84
7 nvim 0x100eb7e68 uv_fs_req_cleanup + 120
8 nvim 0x100e03634 luv_fs_gc + 132
9 nvim 0x100e42aec lj_BC_FUNCC + 44
10 nvim 0x100e44cc8 gc_call_finalizer + 148 (lj_gc.c:521)
11 nvim 0x100b7fdb4 nlua_push_Object + 320 (converter.c:781)
12 nvim 0x100b7fc48 nlua_push_Dictionary + 332 (converter.c:722)
13 nvim 0x100992228 nlua_api_nvim_get_mode + 160 (lua_api_c_bindings.generated.c:6379)
14 nvim 0x100e42aec lj_BC_FUNCC + 44
15 nvim 0x100e590b4 lua_pcall + 228 (lj_api.c:1150)
```
* Convert lua_pushlstring from a macro to a function
* strerror_r is not available on mingw
* Support getting io.popen results on file:close() on PUC-Rio Lua 5.1
* Fix missing closing parenthesis in preprocessor macro
* fix detection of LUA_USE_WINDOWS define
Also switch to new org
* fix: Use os_uname() to check for Linux by @cryptomilk in #686
* docs: typo in a table field name by @Bilal2453 in #689
* docs: most new_handle methods won't return fail by @Bilal2453 in #683
* test-tty: Don't depend on stdin/stdout handle type by @squeek502 in #688
* Bump/libuv by @zhaozg in #690
* Annotate .gitmodules with branch and tag by @creationix in #693