Skip to content

GoDbgKeys before running GoDebug will return an error #605

@rodrigc

Description

@rodrigc

I opened a Go file,
and before running :GoDebug, I ran:
:GoDbgKeys, and encountered this:

Error executing Lua callback: ...local/share/nvim/lazy/guihua.lua/lua/guihua/floating.lua:80: 'width' key must be a positive Integer
stack traceback:
        [C]: in function 'nvim_open_win'
        ...local/share/nvim/lazy/guihua.lua/lua/guihua/floating.lua:80: in function 'floatbuf'
        ...es/.local/share/nvim/lazy/guihua.lua/lua/guihua/view.lua:92: in function 'initialize'
        ...local/share/nvim/lazy/guihua.lua/lua/guihua/listview.lua:49: in function 'initialize'
        ...es/.local/share/nvim/lazy/guihua.lua/lua/middleclass.lua:181: in function 'debug_keys'

It would be nice to not error out like this.

If I ran :GoDebug and then :GoDbgKeys, it properly displayed the debugger keymap:

│s -> step_into                   │
│b -> toggle_breakpoint           │
│c -> continue                    │
│n -> step_over                   │
│p -> dap eval                    │
│B -> float_element('breakpoints')│
│C -> run_to_cursor               │
│u -> dap stack up                │
│D -> dap stack down              │ 
│O -> float_element('scopes')     │
│a -> float_element('stacks')     │
│P -> dap pause                   │
│S -> stop debug session          │
│R -> float_element('repl')       │
│w -> float_element('watches')    │
│r -> dap run                     │
│K -> dapui float_element         │
│o -> step_out                    │

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions