Skip to content

Commit

Permalink
Update the server with current file state after a restart
Browse files Browse the repository at this point in the history
Previously, ycmd would not update the LSP server with the current file
state after RestartServer subcommand had been issued. This causes some
stale diagnostics to linger.
  • Loading branch information
bstaletic committed Feb 14, 2024
1 parent 9d3a703 commit 84ee7c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ycmd/completers/language_server/language_server_completer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,9 @@ def ShutdownServer( self ):
def _RestartServer( self, request_data, *args, **kwargs ):
self.Shutdown()
self._StartAndInitializeServer( request_data, *args, **kwargs )
self._OnInitializeComplete(
lambda self: self._UpdateServerWithFileContents( request_data )
)


def _ServerIsInitialized( self ):
Expand Down

0 comments on commit 84ee7c3

Please sign in to comment.