summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server
diff options
context:
space:
mode:
authorGeequlim <geequlim@gmail.com>2019-10-09 10:01:48 +0800
committerGeequlim <geequlim@gmail.com>2019-10-09 10:01:48 +0800
commit2b5b5874a274b87d8b6c71f8c9ddb0be2d956618 (patch)
tree6d2dcd95af1a23313e93eead2f7eff18a9358b9d /modules/gdscript/language_server
parentbb41f0b0cbc8ceff55a77cec42664c2ee81bb2f2 (diff)
lsp: Fix signature of void returned functions in native methods
Diffstat (limited to 'modules/gdscript/language_server')
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index 6baa7e4219..c289ff6c07 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -269,7 +269,11 @@ Error GDScriptWorkspace::initialize() {
params += params.empty() ? "..." : ", ...";
}
- symbol.detail = "func " + class_name + "." + data.name + "(" + params + ") -> " + data.return_type;
+ String return_type = data.return_type;
+ if (return_type.empty()) {
+ return_type = "void";
+ }
+ symbol.detail = "func " + class_name + "." + data.name + "(" + params + ") -> " + return_type;
symbol.documentation = data.description;
class_symbol.children.push_back(symbol);
}