From fa6d6a329c93224b5454b17603284913da0472a3 Mon Sep 17 00:00:00 2001 From: geequlim Date: Sun, 23 Jun 2019 21:10:28 +0800 Subject: 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 --- modules/gdscript/language_server/gdscript_language_protocol.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/gdscript/language_server/gdscript_language_protocol.cpp') diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp index 7f74e68a94..7c24efe450 100644 --- a/modules/gdscript/language_server/gdscript_language_protocol.cpp +++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp @@ -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; -- cgit v1.2.3