Skip to content
Discussion options

You must be logged in to vote

I want to iterate over the values jump_to_view() (and show_view()) can consume

These functions only allow you to jump to the sections (views) you have configured. If you're using the default configuration, they are

{ "watches", "scopes", "exceptions", "breakpoints", "threads", "repl" }

Else, you're setting the winbar.sections somewhere, which allows you to:

local my_sections = { "watches", "scopes", "threads", "console" }
local binds = {"w", "s", "t", "c"}

require"dap-view".setup({
    winbar = {
        sections = my_sections
    }
})

for i, v in ipairs(my_sections) do
    vim.keymap.set("n", "<leader>j" .. binds[i], function ()
        require"dap-view".jump_to_view(v)
    end, {desc =

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@PhilippFeO
Comment options

@igorlfs
Comment options

Answer selected by igorlfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants