LSP: Don't poll during editor setup

This commit is contained in:
HolonProduction 2025-06-30 13:53:07 +02:00
parent e1b4101e34
commit 4d7c5f9172

View file

@ -45,19 +45,21 @@ GDScriptLanguageServer::GDScriptLanguageServer() {
_EDITOR_DEF("network/language_server/show_native_symbols_in_editor", false);
_EDITOR_DEF("network/language_server/use_thread", use_thread);
_EDITOR_DEF("network/language_server/poll_limit_usec", poll_limit_usec);
set_process_internal(true);
}
void GDScriptLanguageServer::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
start();
} break;
case NOTIFICATION_EXIT_TREE: {
stop();
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
if (!started && EditorNode::get_singleton()->is_editor_ready()) {
start();
}
if (started && !use_thread) {
protocol.poll(poll_limit_usec);
}