Improve code compeletion for virtual methods with signatures

This commit is contained in:
geequlim 2019-08-11 14:06:39 +08:00
parent 72d11cd173
commit e5b91a15e6
2 changed files with 6 additions and 1 deletions

View file

@ -244,7 +244,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
item.documentation = symbol->render();
}
if (item.kind == lsp::CompletionItemKind::Method || item.kind == lsp::CompletionItemKind::Function) {
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) {
item.insertText += ")";