Add optional smart resolve sulotion

The smart resolvaion can guess most symbols but it might be slow so disabled by default users can turn on it in the editor setting
This commit is contained in:
geequlim 2019-06-23 21:10:28 +08:00
parent 37aafaaa9c
commit fa6d6a329c
8 changed files with 260 additions and 65 deletions

View file

@ -32,6 +32,7 @@
#include "core/io/json.h"
#include "core/os/copymem.h"
#include "core/project_settings.h"
#include "editor/editor_node.h"
GDScriptLanguageProtocol *GDScriptLanguageProtocol::singleton = NULL;
@ -159,6 +160,10 @@ void GDScriptLanguageProtocol::notify_client(const String &p_method, const Varia
(*peer)->put_packet((const uint8_t *)charstr.ptr(), charstr.length());
}
bool GDScriptLanguageProtocol::is_smart_resolve_enabled() const {
return bool(_EDITOR_GET("network/language_server/enable_smart_resolve"));
}
GDScriptLanguageProtocol::GDScriptLanguageProtocol() {
server = NULL;
singleton = this;