aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2026-03-16 12:17:24 +0100
committerbfredl <bjorn.linse@gmail.com>2026-05-11 11:00:03 +0200
commit9c42db1181a4a188e5a0f3e35cf37ab9abab33cd (patch)
tree13dd6cc30a647d413805097ee2089bd8e1a4f6e1 /test/functional/vimscript/executable_spec.lua
parent0e7d51a378173fdde0888dd9fd582aff0beb3d7e (diff)
downloadrneovim-9c42db1181a4a188e5a0f3e35cf37ab9abab33cd.tar.gz
rneovim-9c42db1181a4a188e5a0f3e35cf37ab9abab33cd.tar.bz2
rneovim-9c42db1181a4a188e5a0f3e35cf37ab9abab33cd.zip
feat(ui_client): "press ENTER" free nvim crash debugging
This feature might be a little silly and niche, but it is very useful for _my_ workflow (and open source is about mee) An issue which is never present on high quality RELEASE builds, but might occur on Debug builds is that the Nvim server crashes on some error in your unfinished PR code. If you compile your debug builds with sanitizers enabled, as you should, the ASAN/UBSAN runtime will print some useful info about your mistake to stderr or a log file, such as a stack trace. This can be used to jump to the error in the code. This allows the nvim server to install a signal hander in the ui client, which can load this log file in a good safe version of nvim and parse it using 'errorformat' This is inspired by the "press ENTER" free workflow of ui2 and applies it beyond the lifetime cycle of the nvim instance. example config: ```lua local asan = vim.env.ASAN_OPTIONS if asan ~= nil and string.match(asan, "log_path=/tmp/nvim_asan") then local myname = "/tmp/nvim_asan."..vim.uv.getpid() local args = {"--embed", "-n", "+set efm=%+A%*[^/]%f:%l:%c", "+silent cfile "..myname, "+silent cfirst", "+silent copen"} vim.api.nvim__set_restart_on_crash("nvim", args) end ``` and run your debug nvim like so ASAN_OPTIONS=handle_abort=1,handle_sigill=1,log_path=/tmp/nvim_asan ./build/bin/nvim
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions