Merge pull request #34978 from GodotExplorer/lsp-fix-bracket-completion

LSP: Fix bracket completion for functions with one argument
This commit is contained in:
Rémi Verschelde
2020-01-10 07:58:26 +01:00
committed by GitHub

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) {