Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes

This commit is contained in:
Seivan Heidari 2019-11-21 01:11:41 +01:00
commit 358a1bcd70
82 changed files with 1457 additions and 1073 deletions

View file

@ -87,7 +87,7 @@ export class HintsUpdater {
range: hint.range,
renderOptions: {
after: {
contentText: `: ${this.truncateHint(hint.label)}`
contentText: `: ${hint.label}`
}
}
}));
@ -98,18 +98,6 @@ export class HintsUpdater {
}
}
private truncateHint(label: string): string {
if (!Server.config.maxInlayHintLength) {
return label;
}
let newLabel = label.substring(0, Server.config.maxInlayHintLength);
if (label.length > Server.config.maxInlayHintLength) {
newLabel += '…';
}
return newLabel;
}
private async queryHints(documentUri: string): Promise<InlayHint[] | null> {
const request: InlayHintsParams = {
textDocument: { uri: documentUri }

View file

@ -43,6 +43,7 @@ export class Server {
initializationOptions: {
publishDecorations: true,
lruCapacity: Server.config.lruCapacity,
maxInlayHintLength: Server.config.maxInlayHintLength,
excludeGlobs: Server.config.excludeGlobs,
useClientWatching: Server.config.useClientWatching,
featureFlags: Server.config.featureFlags