vimspector icon indicating copy to clipboard operation
vimspector copied to clipboard

[Feature Request]: UI: show the status of listening

Open przepompownia opened this issue 3 years ago • 4 comments

Often I have to run something again (and prepare the case before) because I forgot that I previously stopped execution by <Plug>VimspectorStop and disabled listening as a result.

It would be nice to see on UI if the adapter is still listening without running <Plug>VimspectorContinue to ensure that.

I don't know how much adapter-specific is it. I have no proposition how it would be presented.

przepompownia avatar May 11 '21 16:05 przepompownia

Doesn't it clear the stack trace, locals and watch windows when it disconnects?

puremourning avatar May 11 '21 18:05 puremourning

All windows are clear but after reconnecting with <Plug>VimspectorContinue they looks the same. At most No current thread can appear but this message can be replaced by any next one.

przepompownia avatar May 11 '21 19:05 przepompownia

I guess the best I could come up with is some sort of function that could be incorporated into a statusline. Perhaps some community members could contribute something to the various *line plugins out there that create noisy status lines for people. I think that would be the best I can think of UI wise. WDYT?

puremourning avatar May 15 '21 14:05 puremourning

From the point of view of my needs, the autocommands seem basic and the query and its result - additional and nice to have.

WDYT about the following scenario:

  1. Vimspector detects that the adapter started (or stopped) listening and triggers (on which buffer?) doautocmd <nomodeline> User VimspectorAdapterStartedListening (any more accurate name instead of it).

  2. For starting I catch the event (pseudocode below):

autocmd User VimspectorAdapterStartedListening  <buffer> ++nested
    \ let t:vimspector_listening_status = vimspector#some_ns#queryStatus() 
" or simpler, without querying
    \ let t:vimspector_listening_status = v:true
    \ call refresh#you#presentation#layer() " e.g. statusline

and similarly for stopping. It can avoid executing unneeded queries to Vimspector.

If Vimspector were provide such tab-level boolean variable (UI seems to be associated with tab) then the above assigning would be unneeded.

przepompownia avatar May 15 '21 18:05 przepompownia