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");
44
44
const chainingHints = createHintStyle ( "chaining" ) ;
45
45
46
46
function 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
47
49
const [ pos , render ] = ( {
48
- type : [ "after" , ( label : string ) => `: ${ label } ` ] ,
50
+ type : [ "after" , ( label : string ) => `\u{200c} : ${ label } ` ] ,
49
51
parameter : [ "before" , ( label : string ) => `${ label } : ` ] ,
50
- chaining : [ "after" , ( label : string ) => `: ${ label } ` ] ,
52
+ chaining : [ "after" , ( label : string ) => `\u{200c} : ${ label } ` ] ,
51
53
} as const ) [ hintKind ] ;
52
54
53
55
const fg = new vscode . ThemeColor ( `rust_analyzer.inlayHints.foreground.${ hintKind } Hints` ) ;
You can’t perform that action at this time.
0 commit comments