about summary refs log tree commit diff
path: root/editors/code/src
diff options
context:
space:
mode:
Diffstat (limited to 'editors/code/src')
-rw-r--r--editors/code/src/commands/inlay_hints.ts14
-rw-r--r--editors/code/src/server.ts1
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