mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 19:24:18 +00:00
LSP: Don't poll during editor setup
This commit is contained in:
parent
e1b4101e34
commit
4d7c5f9172
1 changed files with 6 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue