1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

LSP: Fix bracket completion for functions with one argument

This commit is contained in:
Geequlim
2020-01-10 14:23:01 +08:00
parent 76678b2609
commit 6190d42825

View File

@@ -269,7 +269,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
if ((item.kind == lsp::CompletionItemKind::Method || item.kind == lsp::CompletionItemKind::Function) && !item.label.ends_with("):")) {
item.insertText = item.label + "(";
if (symbol && symbol->detail.find(",") == -1) {
if (symbol && symbol->children.empty()) {
item.insertText += ")";
}
} else if (item.kind == lsp::CompletionItemKind::Event) {