diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/language_server/lsp.hpp | 6 | ||||
-rw-r--r-- | modules/jsonrpc/jsonrpc.cpp | 2 | ||||
-rw-r--r-- | modules/websocket/register_types.cpp | 9 |
3 files changed, 12 insertions, 5 deletions
diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp index 44a0076107..cf27a1578c 100644 --- a/modules/gdscript/language_server/lsp.hpp +++ b/modules/gdscript/language_server/lsp.hpp @@ -486,7 +486,7 @@ struct TextDocumentSyncOptions { * If present save notifications are sent to the server. If omitted the notification should not be * sent. */ - SaveOptions save; + bool save = false; Dictionary to_json() { Dictionary dict; @@ -494,7 +494,7 @@ struct TextDocumentSyncOptions { dict["willSave"] = willSave; dict["openClose"] = openClose; dict["change"] = change; - dict["save"] = save.to_json(); + dict["save"] = save; return dict; } }; @@ -1656,7 +1656,7 @@ struct ServerCapabilities { _FORCE_INLINE_ Dictionary to_json() { Dictionary dict; - dict["textDocumentSync"] = (int)textDocumentSync.change; + dict["textDocumentSync"] = textDocumentSync.to_json(); dict["completionProvider"] = completionProvider.to_json(); signatureHelpProvider.triggerCharacters.push_back(","); signatureHelpProvider.triggerCharacters.push_back("("); diff --git a/modules/jsonrpc/jsonrpc.cpp b/modules/jsonrpc/jsonrpc.cpp index 6ab5f2d9b3..7bb70b098f 100644 --- a/modules/jsonrpc/jsonrpc.cpp +++ b/modules/jsonrpc/jsonrpc.cpp @@ -120,7 +120,7 @@ Variant JSONRPC::process_action(const Variant &p_action, bool p_process_arr_elem } if (object == nullptr || !object->has_method(method)) { - ret = make_response_error(JSONRPC::METHOD_NOT_FOUND, "Method not found", id); + ret = make_response_error(JSONRPC::METHOD_NOT_FOUND, "Method not found: " + method, id); } else { Variant call_ret = object->callv(method, args); if (id.get_type() != Variant::NIL) { diff --git a/modules/websocket/register_types.cpp b/modules/websocket/register_types.cpp index 1ad249e1eb..bc50de414e 100644 --- a/modules/websocket/register_types.cpp +++ b/modules/websocket/register_types.cpp @@ -42,9 +42,16 @@ #endif #ifdef TOOLS_ENABLED #include "editor/debugger/editor_debugger_server.h" +#include "editor/editor_node.h" #include "editor_debugger_server_websocket.h" #endif +#ifdef TOOLS_ENABLED +static void _editor_init_callback() { + EditorDebuggerServer::register_protocol_handler("ws://", EditorDebuggerServerWebSocket::create); +} +#endif + void register_websocket_types() { #ifdef JAVASCRIPT_ENABLED EMWSPeer::make_default(); @@ -62,7 +69,7 @@ void register_websocket_types() { ClassDB::register_custom_instance_class<WebSocketPeer>(); #ifdef TOOLS_ENABLED - EditorDebuggerServer::register_protocol_handler("ws://", EditorDebuggerServerWebSocket::create); + EditorNode::add_init_callback(&_editor_init_callback); #endif } |