File tree 3 files changed +8
-21
lines changed
3 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -722,7 +722,7 @@ Just add this to your `settings.json`:
722
722
{
723
723
"editor.inlayHints.fontFamily": "Courier New",
724
724
"editor.inlayHints.fontSize": 11,
725
-
725
+
726
726
"workbench.colorCustomizations": {
727
727
// Name of the theme you are currently using
728
728
"[Default Dark+]": {
@@ -797,8 +797,8 @@ For example:
797
797
[source,json]
798
798
----
799
799
{
800
- "key": "ctrl+i ",
801
- "command": "rust-analyzer.toggleInlayHints ",
800
+ "key": "ctrl+alt+d ",
801
+ "command": "rust-analyzer.openDocs ",
802
802
"when": "inRustProject"
803
803
}
804
804
----
Original file line number Diff line number Diff line change @@ -298,12 +298,12 @@ export function serverVersion(ctx: Ctx): Cmd {
298
298
} ;
299
299
}
300
300
301
- export function toggleInlayHints ( ctx : Ctx ) : Cmd {
301
+ export function toggleInlayHints ( _ctx : Ctx ) : Cmd {
302
302
return async ( ) => {
303
- await vscode
304
- . workspace
305
- . getConfiguration ( ` ${ ctx . config . rootSection } .inlayHints` )
306
- . update ( 'enable ' , ! ctx . config . inlayHints . enable , vscode . ConfigurationTarget . Global ) ;
303
+ const scope = vscode . ConfigurationTarget . Global ;
304
+ const config = vscode . workspace . getConfiguration ( "editor.inlayHints" ) ;
305
+ const value = ! config . get ( "enabled" ) ;
306
+ await config . update ( 'enabled ' , value , scope ) ;
307
307
} ;
308
308
}
309
309
Original file line number Diff line number Diff line change @@ -97,19 +97,6 @@ export class Config {
97
97
get serverExtraEnv ( ) { return this . get < Env | null > ( "server.extraEnv" ) ?? { } ; }
98
98
get traceExtension ( ) { return this . get < boolean > ( "trace.extension" ) ; }
99
99
100
- get inlayHints ( ) {
101
- return {
102
- enable : this . get < boolean > ( "inlayHints.enable" ) ,
103
- typeHints : this . get < boolean > ( "inlayHints.typeHints" ) ,
104
- parameterHints : this . get < boolean > ( "inlayHints.parameterHints" ) ,
105
- chainingHints : this . get < boolean > ( "inlayHints.chainingHints" ) ,
106
- closureReturnTypeHints : this . get < boolean > ( "inlayHints.closureReturnTypeHints" ) ,
107
- hideNamedConstructorHints : this . get < boolean > ( "inlayHints.hideNamedConstructorHints" ) ,
108
- smallerHints : this . get < boolean > ( "inlayHints.smallerHints" ) ,
109
- maxLength : this . get < null | number > ( "inlayHints.maxLength" ) ,
110
- } ;
111
- }
112
-
113
100
get cargoRunner ( ) {
114
101
return this . get < string | undefined > ( "cargoRunner" ) ;
115
102
}
You can’t perform that action at this time.
0 commit comments