Description
I am using LazyVim which uses this setup https://github.com/LazyVim/LazyVim/blob/ad22adab7d446018875de2dc96168295cad9298e/lua/lazyvim/plugins/extras/dap/nlua.lua#L31
Here is my config on top:
https://github.com/kapral18/dotfiles/blob/ad539b7b57222293fdcae58fa2dde498789a34dd/home/dot_config/exact_nvim/exact_lua/exact_plugins/osv.lua
Initially I spotted the issue when trying to debug plugins inside lazy.nvim plugin folder, but to showcase the gist of it a simplified example will do as well.
- I create
main.lua
:
local function test()
print(1)
print(2)
print(3)
print(4)
print(5)
print(6)
end
vim.keymap.set("n", "<Space>0", test, { buffer = true })
-
I run
F5
from my config and seeServer started on port 8086
. -
I open a second nvim instance with the same file, and set breakpoint on line 3 (with
print(2)
). -
I see the message "Running: Attach to running Neovim instance" but couple of seconds later got a message about debug adapter not responding
-
I switch to debugee instance and run the file to make sure keymap is registered with
:luafile %
-
I try the keymap and only see printed number in debuggee. Debugger doesn't respond.
-
I exit debuggee instance and the debugger suddenly pops up the dap widget UI
But at no point the breakpoint is caught.