You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Merge pull request #108140 from HolonProduction/lsp-init-delay
LSP: Don't poll during editor setup
This commit is contained in:
@@ -45,19 +45,21 @@ GDScriptLanguageServer::GDScriptLanguageServer() {
|
|||||||
_EDITOR_DEF("network/language_server/show_native_symbols_in_editor", false);
|
_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/use_thread", use_thread);
|
||||||
_EDITOR_DEF("network/language_server/poll_limit_usec", poll_limit_usec);
|
_EDITOR_DEF("network/language_server/poll_limit_usec", poll_limit_usec);
|
||||||
|
|
||||||
|
set_process_internal(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GDScriptLanguageServer::_notification(int p_what) {
|
void GDScriptLanguageServer::_notification(int p_what) {
|
||||||
switch (p_what) {
|
switch (p_what) {
|
||||||
case NOTIFICATION_ENTER_TREE: {
|
|
||||||
start();
|
|
||||||
} break;
|
|
||||||
|
|
||||||
case NOTIFICATION_EXIT_TREE: {
|
case NOTIFICATION_EXIT_TREE: {
|
||||||
stop();
|
stop();
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case NOTIFICATION_INTERNAL_PROCESS: {
|
case NOTIFICATION_INTERNAL_PROCESS: {
|
||||||
|
if (!started && EditorNode::get_singleton()->is_editor_ready()) {
|
||||||
|
start();
|
||||||
|
}
|
||||||
|
|
||||||
if (started && !use_thread) {
|
if (started && !use_thread) {
|
||||||
protocol.poll(poll_limit_usec);
|
protocol.poll(poll_limit_usec);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user