mfussenegger / nvim-dap

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

Eagerly load lazy variables when expanding children #1072

Closed mfussenegger closed 11 months ago

mfussenegger commented 11 months ago

As described in https://github.com/mfussenegger/nvim-dap/issues/1062 Some debug adapters heavily use the lazy hint.

For example, a collapsed list is initially displayed as:

settings: ArrayList@50 size=1

That's good. But after expanding, the contained items looke like this:

settings: ArrayList@50 size=1
  0: Assignment@66

Each individual item had to be expanded to show the value:

settings: ArrayList@50 size=1
  0: Assignment@66 "Assignment{column='stats.jobs_log_size', expressions=[1024]}"

This removes the intermediate step, to go from:

settings: ArrayList@50 size=1

Straight to:

settings: ArrayList@50 size=1
  0: Assignment@66 "Assignment{column='stats.jobs_log_size', expressions=[1024]}"