File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,24 @@ export async function createClient(
100
100
}
101
101
} ,
102
102
} ,
103
+ async provideInlayHints ( document , viewPort , token , next ) {
104
+ const inlays = await next ( document , viewPort , token ) ;
105
+ if ( ! inlays ) {
106
+ return inlays ;
107
+ }
108
+ // U+200C is a zero-width non-joiner to prevent the editor from forming a ligature
109
+ // between code and hints
110
+ for ( const inlay of inlays ) {
111
+ if ( typeof inlay . label === "string" ) {
112
+ inlay . label = `\u{200c}${ inlay . label } \u{200c}` ;
113
+ } else if ( Array . isArray ( inlay . label ) ) {
114
+ for ( const it of inlay . label ) {
115
+ it . value = `\u{200c}${ it . value } \u{200c}` ;
116
+ }
117
+ }
118
+ }
119
+ return inlays ;
120
+ } ,
103
121
async handleDiagnostics (
104
122
uri : vscode . Uri ,
105
123
diagnostics : vscode . Diagnostic [ ] ,
You can’t perform that action at this time.
0 commit comments