File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -44,10 +44,12 @@ const paramHints = createHintStyle("parameter");
4444const chainingHints = createHintStyle ( "chaining" ) ;
4545
4646function createHintStyle ( hintKind : "type" | "parameter" | "chaining" ) {
47+ // U+200C is a zero-width non-joiner to prevent the editor from forming a ligature
48+ // between code and type hints
4749 const [ pos , render ] = ( {
48- type : [ "after" , ( label : string ) => `: ${ label } ` ] ,
50+ type : [ "after" , ( label : string ) => `\u{200c} : ${ label } ` ] ,
4951 parameter : [ "before" , ( label : string ) => `${ label } : ` ] ,
50- chaining : [ "after" , ( label : string ) => `: ${ label } ` ] ,
52+ chaining : [ "after" , ( label : string ) => `\u{200c} : ${ label } ` ] ,
5153 } as const ) [ hintKind ] ;
5254
5355 const fg = new vscode . ThemeColor ( `rust_analyzer.inlayHints.foreground.${ hintKind } Hints` ) ;
You can’t perform that action at this time.
0 commit comments