-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
need help: dap debug go err: virtual_text.lua:132: bad argument #1 to pairs table expected, got userdata #88
Comments
I encountered the same problem and it can be solved by rolling back to 9578276 |
it's useful for me |
theHamsta
added a commit
that referenced
this issue
Sep 28, 2024
After #87, this plugin became incompatible with nvim versions <= 0.9 by using the newly table parameter of iter_matches. This PR tries to avoid the parameter and tries to account that iter_matches might return either nodes or tables of nodes by coercing non-table values to singleton tables. Fixes #88
theHamsta
added a commit
that referenced
this issue
Oct 4, 2024
After #87, this plugin became incompatible with nvim versions <= 0.9 by using the newly table parameter of iter_matches. This PR tries to avoid the parameter and tries to account that iter_matches might return either nodes or tables of nodes by coercing non-table values to singleton tables. Fixes #88
Verified that #89 fixes the issue. On master:
and working as expected with the fix. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nvim version:
lua version:
when i debug go program using dap-go, if with breakpoint the error happen, when without breakpoint error not occur
i use lazyvim manager my nvim plugins, the dap relative plugin config is below:
`local custom = {}
custom["leoluz/nvim-dap-go"] = {
"leoluz/nvim-dap-go",
dependencies = {
"mfussenegger/nvim-dap",
},
config = function()
require("dap-go").setup()
end,
}
custom["rcarriga/nvim-dap-ui"] = {
"rcarriga/nvim-dap-ui",
dependencies = {
"nvim-neotest/nvim-nio",
},
}
custom["theHamsta/nvim-dap-virtual-text"] = {
"theHamsta/nvim-dap-virtual-text",
dependencies = {
"mfussenegger/nvim-dap",
"nvim-treesitter/nvim-treesitter",
},
init = function()
require("nvim-dap-virtual-text").setup({
enabled = true,
enabled_commands = true,
highlight_changed_variables = true,
highlight_new_as_changed = true,
virt_text_pos = "eol",
commented = true,
})
end,
}
custom["nvim-telescope/telescope-dap.nvim"] = {
"nvim-telescope/telescope-dap.nvim",
dependencies = {
"mfussenegger/nvim-dap",
},
}
custom["mfussenegger/nvim-dap"] = {
"mfussenegger/nvim-dap",
dependencies = {
"rcarriga/nvim-dap-ui",
},
keys = {
{
"",
function()
require("telescope").extensions.dap.configurations()
end,
mode = { "n" },
desc = "debug",
},
{
"",
function()
require("dap").terminate()
end,
mode = { "n" },
desc = "debug",
},
{
"",
function()
require("dap").step_over()
end,
mode = { "n" },
desc = "debug",
},
{
"",
function()
require("dap").step_into()
end,
mode = { "n" },
desc = "debug",
},
{
"",
function()
require("dap").step_out()
end,
mode = { "n" },
desc = "debug",
},
{
"db",
function()
require("dap").toggle_breakpoint()
end,
mode = { "n" },
desc = "debug",
},
{
"dl",
function()
require("dap").run_last()
end,
mode = { "n" },
desc = "debug",
},
},
config = function()
local dap, dapui = require("dap"), require("dapui")
dapui.setup()
dap.listeners.before.attach.dapui_config = function()
dapui.open()
end
dap.listeners.before.launch.dapui_config = function()
dapui.open()
end
dap.listeners.before.event_terminated.dapui_config = function()
dapui.close()
end
dap.listeners.before.event_exited.dapui_config = function()
dapui.close()
end
end,
}
return custom
`
The text was updated successfully, but these errors were encountered: