Closed NEX-S closed 2 years ago
I don't know why this would happen.
I am wondering if there are any ways I can using <C-d>
to call dap.continue()
in all languages that I have configured.
For example:
in C, I press <C-d>
, dap starting to work.
in Python, I press <C-d>
, dap starting to work.
in Lua, I press <C-d>
, dap starting to work too (not asking me the host or port, set it default to 127.0.0.1 and 8088)
I wish "osv" can automatic start when I press <C-d>
in lua.
i have tried to using autocmd to reach that for me.
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = "lua",
callback = function ()
vim.keymap.set('n', '<C-d>', require "osv".run_this, { noremap = true, silent = true })
end
})
but i will got this messages
Couldn't connect to 127.0.0.1:8088: ECONNREFUSED
here's my config
dap.configurations.lua = {
{
type = 'nlua',
request = 'attach',
name = "Attach to running Neovim instance",
host = '127.0.0.1',
port = 8088,
}
}
dap.adapters.nlua = function (callback, config)
callback({ type = 'server', host = config.host, port = config.port })
end
Hi,
So one-small-step-for-vimkind is not really meant to be used as a debugger for vanilla lua scripts. It was specifically designed to debug neovim plugins. Meaning you still need to manually start another instance + start the server with launch()
. You can still have a shortcut to dap.continue()
in the debugger instance, which I also do. Maybe that clears some issues.
There is WIP ways to automatically start another neovim instance, and the debugger automatically here but this only works for linux/alacritty currently.
Thanks!
if i using this to auto enable the osv
then i will get this error messages