Revert "Use ZWNJ to prevent VSCode from forming ligatures between hints and code"

This commit is contained in:
Lukas Wirth 2023-01-10 09:43:08 +01:00 committed by GitHub
parent 368e0bb32f
commit 4267b11c40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -102,24 +102,6 @@ export async function createClient(
}
},
},
async provideInlayHints(document, viewPort, token, next) {
const inlays = await next(document, viewPort, token);
if (!inlays) {
return inlays;
}
// U+200C is a zero-width non-joiner to prevent the editor from forming a ligature
// between code and hints
for (const inlay of inlays) {
if (typeof inlay.label === "string") {
inlay.label = `\u{200c}${inlay.label}\u{200c}`;
} else if (Array.isArray(inlay.label)) {
for (const it of inlay.label) {
it.value = `\u{200c}${it.value}\u{200c}`;
}
}
}
return inlays;
},
async handleDiagnostics(
uri: vscode.Uri,
diagnosticList: vscode.Diagnostic[],