From e199488bc7f8c37e14ea414fd7986272b50f40ff Mon Sep 17 00:00:00 2001 From: geequlim Date: Fri, 4 Oct 2019 20:53:40 +0800 Subject: Add custom api `textDocument/nativeSymbol` to allow inspect native symbols from LSP clients --- modules/gdscript/language_server/lsp.hpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'modules/gdscript/language_server/lsp.hpp') diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp index fb970206c7..a70382121c 100644 --- a/modules/gdscript/language_server/lsp.hpp +++ b/modules/gdscript/language_server/lsp.hpp @@ -1134,7 +1134,7 @@ struct DocumentSymbol { */ Vector children; - _FORCE_INLINE_ Dictionary to_json(bool with_doc = false) const { + Dictionary to_json(bool with_doc = false) const { Dictionary dict; dict["name"] = name; dict["detail"] = detail; @@ -1233,6 +1233,17 @@ struct DocumentSymbol { } }; +struct NativeSymbolInspectParams { + + String native_class; + String symbol_name; + + void load(const Dictionary &p_params) { + native_class = p_params["native_class"]; + symbol_name = p_params["symbol_name"]; + } +}; + /** * Enum of known range kinds */ -- cgit v1.2.3