-
Hi, I'm trying to customize the nvim-dap-view plugin to set the default winbar section to "scopes", but I keep getting the following error on startup: Failed to run `config` for nvim-dap-view
.../lazy/nvim-dap-view/lua/dap-view/setup/validate/util.lua:23: config..../lazy/nvim-dap-view/lua/dap-view/setup/validate/util.lua:11: opt: expected table, got string
# stacktrace:
- .config/nvim/lua/config/lazy.lua:19
- .config/nvim/init.lua:2 Here is the minimal config I tried: return {
"igorlfs/nvim-dap-view",
---@module 'dap-view'
---@type dapview.Config
opts = {
winbar = {
default_section = "scopes",
},
},
} I also tried using the explicit setup call inside a config function: return {
"igorlfs/nvim-dap-view",
opts = {},
---@module 'dap-view'
---@type dapview.Config
config = function()
require("dap-view").setup({
winbar = {
default_section = "scopes",
},
})
end,
}
Both approaches cause the same error. I am a new neovim user so from what I understand, default_section expects a string, so I'm unsure why the plugin complains about "expected table, got string". Is there a required parent table or additional fields that need to be set alongside default_section? Or maybe the winbar table itself requires a specific structure? Could someone please advise on the correct way to set the default_section to "scopes"r? Also, if there are any example configurations that correctly override winbar options, that would be very helpful. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Another issue : While testing nvim-dap-view, I noticed that opening any section other than the REPL triggers this error popup: Error executing Lua callback: ...share/nvim/lazy/nvim-dap-view/lua/dap-view/util/hl.lua:10: attempt to index field 'hl' (a nil value)
stack traceback:
...hl.lua:10: in function 'hl_range'
...views/init.lua:19: in function 'cleanup_view'
...watches/view.lua:98: in function 'show'
...views/init.lua:45: in function 'switch_to_view'
...config.lua:113: in function 'action'
...winbar/init.lua:53: in function 'wrapped_action'
...winbar/init.lua:163: in function 'show_content'
...actions.lua:85: in function 'open'
...actions.lua:20: in function 'toggle'
...dap-view.lua:26: in function 'toggle'
...dap-view.lua:10: in function <...dap-view.lua:9> After pressing Enter the plugin continues working normally, but the error pops up again each time I switch to a different section (other than REPL). |
Beta Was this translation helpful? Give feedback.
-
Hello,
The reason why you're getting this error is that you're using an outdated (<0.11) neovim version.
Just a heads-up, as you're new to neovim: lazy.nvim's opts are passed to the setup function, so there's no difference in doing that. Under normal circumstances, opts and config should not be used together.
You're on the right track, it's just the outdated neovim version that's on the way. But in any case, you can take a look at the docs to check the full default config.
This is also caused by the outdated neovim version. Please, update to >=0.11.0. |
Beta Was this translation helpful? Give feedback.
Hello,
The reason why you're getting this error is that you're using an outdated (<0.11) neovim version.
Just a heads-up, as you're new to neovim: lazy.nvim's opts are passed to the setup function, so there's no difference in doing that. Under normal circumstances, opts and config should not be used together.
You're on the right track, it's just the outdated neovim version that's on the way. But in any case, you can take a look at the docs to check the full default config.