Skip to content

0.2.0

Compare
Choose a tag to compare
@mfussenegger mfussenegger released this 05 Aug 14:17
· 255 commits to master since this release
0.2.0
  • Improved the handling of disconnects. Previously if a user invoked terminate or disconnect multiple times, it would terminate or disconnect the session with the first invocation and the remaining invocations would eventually timeout. This timeout could cause a new session started later to disconnect as well, leading to an inconsistent state and unusable session.

  • Stepping operations (step_out, step_into, step_over ..) will now prompt for a thread to resume if there is no stopped thread in focus and if other threads are paused. This can be the case if either, threads were manually paused or if the auto_continue_if_many_stopped option is set to false. See Demo

  • Functions used in configurations (:h dap-configuration) can now also return coroutine/thread values. This allows to use asynchronous operations to compute values to use in the configuration. There are some constraints:

    • The function must return a suspended coroutine.
    • The function must eventually hand back control to nvim-dap by resuming the outer coroutine with the result. If it fails to do so, the launch-session operation will become stuck.

    An example:

    foo = function()
      return coroutine.create(function(dap_run_co)
        local items = {'one', 'two'}
        vim.ui.select(items, { label = 'foo> '}, function(choice)
          coroutine.resume(dap_run_co, choice)
        end)
      end)
    end,
  • The pick_process helper function which can be used in configurations to select a running process is now using vim.ui.select instead of inputlist.

  • Added a dap-type variable to the integrated terminal buffer. This dap-type variable contains the value of the :h dap-configuration type.

  • Added support for the breakpoint event with reason = 'changed' to allow debug adapters to change the verified state of breakpoints.

Widgets

  • The hover widget will now by default evaluate the selected expression if in visual mode. This makes it possible to define keymaps like vim.keymap.set('v', '<leader>dh', require('dap.ui.widgets').hover). The require("dap.utils").get_visual_selection_text function which could be used before to get a similar behavior is now deprecated.

  • Added a new preview widget that can be used to show the values of variables in the preview window. You can create a mapping like vim.keymap.set({'n', 'v'}, '<leader>dp', require('dap.ui.widgets').preview) to use it.

  • The presentationHint.lazy flag is now recognized in widgets rendering variables. This has the effect that lazy variables no longer take an extra line when loaded but instead the existing line is updated in-place.

REPL

  • Evaluating expressions in the REPL should no longer render a dap> prompt between the first line of the result and subsequent lines.