mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.46k stars 194 forks source link

Show last message in statusline #1121

Closed NSteinhoff closed 9 months ago

NSteinhoff commented 9 months ago

If there are pending messages, they would previously be displayed one by one in the status line on each redraw (typically when moving the cursor). Instead, the last message is shown always.

This may have been the intended behavior, but the documentation for dap.status() does not mention it. If so, please close this PR.

mfussenegger commented 9 months ago

Thanks for the PR but that's working as intended. If you want to update the status line immediately after a new message you can add a autocmd on User DapProgressUpdate to refresh the status:

vim.api.nvim_create_autocmd("User", {
  group = vim.api.nvim_create_augroup("dap-status", { clear = true }),
  pattern = "DapProgressUpdate",
  command = "redrawstatus"
})
NSteinhoff commented 9 months ago

Awesome, thanks!