Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
przepompownia opened this issue May 11, 2021 · 4 comments
Open

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

przepompownia opened this issue May 11, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@przepompownia
Copy link
Contributor

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.

@puremourning
Copy link
Owner

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

@przepompownia
Copy link
Contributor Author

przepompownia commented May 11, 2021

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.

@puremourning
Copy link
Owner

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?

@przepompownia
Copy link
Contributor Author

przepompownia commented May 15, 2021

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.

@puremourning puremourning added the enhancement New feature or request label May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants