Add the symbol definition to the doc response if 'extended' is passed to the client
This commit is contained in:
parent
f15ca10acf
commit
8167458355
|
|
@ -250,7 +250,7 @@ int runClient(string[] args)
|
||||||
else if (getIdentifier)
|
else if (getIdentifier)
|
||||||
printIdentifierResponse(response);
|
printIdentifierResponse(response);
|
||||||
else if (doc)
|
else if (doc)
|
||||||
printDocResponse(response);
|
printDocResponse(response, fullOutput);
|
||||||
else if (search !is null)
|
else if (search !is null)
|
||||||
printSearchResponse(response);
|
printSearchResponse(response);
|
||||||
else if (localUse)
|
else if (localUse)
|
||||||
|
|
@ -359,10 +359,14 @@ Socket createSocket(string socketFile, ushort port)
|
||||||
return socket;
|
return socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
void printDocResponse(ref const AutocompleteResponse response)
|
void printDocResponse(ref const AutocompleteResponse response, bool extended)
|
||||||
{
|
{
|
||||||
import std.algorithm : each;
|
foreach (ref completion; response.completions)
|
||||||
response.completions.each!(a => a.documentation.escapeConsoleOutputString(true).writeln);
|
{
|
||||||
|
if (extended)
|
||||||
|
writeln(completion.definition);
|
||||||
|
writeln(completion.documentation.escapeConsoleOutputString(true));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void printIdentifierResponse(ref const AutocompleteResponse response)
|
void printIdentifierResponse(ref const AutocompleteResponse response)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue