append * if the type is a pointer

This commit is contained in:
ryuukk 2023-02-03 20:32:18 +01:00 committed by GitHub
parent 6c1a25883b
commit 64328dcf88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -763,7 +763,7 @@ AutocompleteResponse.Completion makeSymbolCompletionInfo(const DSymbol* symbol,
{
string definition;
if ((kind == CompletionKind.variableName || kind == CompletionKind.memberVariableName) && symbol.type)
definition = symbol.type.name ~ ' ' ~ symbol.name;
definition = symbol.type.name ~ (symbol.type.isPointer ? "*" : "") ~ ' ' ~ symbol.name;
else if (kind == CompletionKind.enumMember)
definition = symbol.name; // TODO: add enum value to definition string
else