diff options
| author | Seivan Heidari <seivan.heidari@icloud.com> | 2019-11-21 01:11:41 +0100 |
|---|---|---|
| committer | Seivan Heidari <seivan.heidari@icloud.com> | 2019-11-21 01:11:41 +0100 |
| commit | 358a1bcd708c622836723e5201b6de77cc9ff327 (patch) | |
| tree | aeff9c96a6059fa2b02e7c87ec88753bc7993d8d /editors/code/src | |
| parent | 1e2d090ab8a9bda18f148b894b7948eb05b976e6 (diff) | |
| parent | 612a72fc4ea4376920f2a7da7b3c334227c1716c (diff) | |
| download | rust-358a1bcd708c622836723e5201b6de77cc9ff327.tar.gz rust-358a1bcd708c622836723e5201b6de77cc9ff327.zip | |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'editors/code/src')
| -rw-r--r-- | editors/code/src/commands/inlay_hints.ts | 14 | ||||
| -rw-r--r-- | editors/code/src/server.ts | 1 |
2 files changed, 2 insertions, 13 deletions
diff --git a/editors/code/src/commands/inlay_hints.ts b/editors/code/src/commands/inlay_hints.ts index ffaaaebcb05..0dbdd94fbac 100644 --- a/editors/code/src/commands/inlay_hints.ts +++ b/editors/code/src/commands/inlay_hints.ts @@ -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 } diff --git a/editors/code/src/server.ts b/editors/code/src/server.ts index a3ef21a1671..7907b70bc51 100644 --- a/editors/code/src/server.ts +++ b/editors/code/src/server.ts @@ -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 |
