vimspector
vimspector copied to clipboard
[Feature Request]: UI: show the status of listening
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.
Doesn't it clear the stack trace, locals and watch windows when it disconnects?
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.
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?
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:
-
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). -
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.