Display warning message abouc XDebug enabled
parent
5077b1a87a
commit
c4b39e6e59
|
@ -10,11 +10,10 @@ use LanguageServer\Protocol\{
|
|||
Message,
|
||||
MessageType,
|
||||
InitializeResult,
|
||||
SymbolInformation,
|
||||
TextDocumentIdentifier
|
||||
};
|
||||
use AdvancedJsonRpc;
|
||||
use Sabre\Event\{Loop, Promise};
|
||||
use Sabre\Event\Promise;
|
||||
use function Sabre\Event\coroutine;
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
@ -22,6 +21,7 @@ use Webmozart\Glob\Iterator\GlobIterator;
|
|||
use Webmozart\Glob\Glob;
|
||||
use Webmozart\PathUtil\Path;
|
||||
use Sabre\Uri;
|
||||
use function Sabre\Event\Loop\setTimeout;
|
||||
|
||||
class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
||||
{
|
||||
|
@ -125,6 +125,12 @@ class LanguageServer extends AdvancedJsonRpc\Dispatcher
|
|||
$this->indexProject()->otherwise('\\LanguageServer\\crash');
|
||||
}
|
||||
|
||||
if (extension_loaded('xdebug')) {
|
||||
setTimeout(function () {
|
||||
$this->client->window->showMessage(MessageType::WARNING, 'You are running PHP Language Server with xdebug enabled. This has a major impact on server performance.');
|
||||
}, 1);
|
||||
}
|
||||
|
||||
$serverCapabilities = new ServerCapabilities();
|
||||
// Ask the client to return always full documents (because we need to rebuild the AST from scratch)
|
||||
$serverCapabilities->textDocumentSync = TextDocumentSyncKind::FULL;
|
||||
|
|
Loading…
Reference in New Issue