Add a splash popup while starting up

Sometimes it can take quite a while to start up and initialise the debug
adapter. So we use popup/float to display the status as we start up and
shut down.

This increases minimum Vim version to 8.2, but that's been out for ages
now and I intend to agressively require latest/later vim/neovim
versions.
This commit is contained in:
Ben Jackson 2020-03-26 22:48:06 +00:00
commit 1003cdc0b2
7 changed files with 173 additions and 6 deletions

View file

@ -546,3 +546,20 @@ def SetSyntax( current_syntax, syntax, *args ):
def GetBufferFiletypes( buf ):
ft = ToUnicode( vim.eval( f"getbufvar( {buf.number}, '&ft' )" ) )
return ft.split( '.' )
def DisplaySplash( api_prefix, splash, text ):
if splash:
return Call( f'vimspector#internal#{api_prefix}popup#UpdateSplash',
splash,
text )
else:
return Call( f'vimspector#internal#{api_prefix}popup#DisplaySplash',
text )
def HideSplash( api_prefix, splash ):
if splash:
Call( f'vimspector#internal#{api_prefix}popup#HideSplash', splash )
return None