1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #108140 from HolonProduction/lsp-init-delay

LSP: Don't poll during editor setup
This commit is contained in:
Thaddeus Crews
2025-07-03 12:21:20 -05:00

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);
}