@@ -53,22 +53,29 @@ export function activate(context: vscode.ExtensionContext) {
53
53
) ;
54
54
} ;
55
55
56
- const { underlineThickness } = vscode . workspace . getConfiguration ( "rustowl" ) ;
56
+ const {
57
+ underlineThickness,
58
+ lifetimeColor,
59
+ moveCallColor,
60
+ immutableBorrowColor,
61
+ mutableBorrowColor,
62
+ outliveColor,
63
+ } = vscode . workspace . getConfiguration ( "rustowl" ) ;
57
64
58
65
lifetimeDecorationType = vscode . window . createTextEditorDecorationType ( {
59
- textDecoration : `underline solid ${ underlineThickness } px hsla(125, 80%, 60%, 0.8) ` ,
66
+ textDecoration : `underline solid ${ underlineThickness } px ${ lifetimeColor } ` ,
60
67
} ) ;
61
68
moveDecorationType = vscode . window . createTextEditorDecorationType ( {
62
- textDecoration : `underline solid ${ underlineThickness } px hsla(35, 80%, 60%, 0.8) ` ,
69
+ textDecoration : `underline solid ${ underlineThickness } px ${ moveCallColor } ` ,
63
70
} ) ;
64
71
imBorrowDecorationType = vscode . window . createTextEditorDecorationType ( {
65
- textDecoration : `underline solid ${ underlineThickness } px hsla(230, 80%, 60%, 0.8) ` ,
72
+ textDecoration : `underline solid ${ underlineThickness } px ${ immutableBorrowColor } ` ,
66
73
} ) ;
67
74
mBorrowDecorationType = vscode . window . createTextEditorDecorationType ( {
68
- textDecoration : `underline solid ${ underlineThickness } px hsla(300, 80%, 60%, 0.8) ` ,
75
+ textDecoration : `underline solid ${ underlineThickness } px ${ mutableBorrowColor } ` ,
69
76
} ) ;
70
77
outLiveDecorationType = vscode . window . createTextEditorDecorationType ( {
71
- textDecoration : `underline solid ${ underlineThickness } px hsla(0, 80%, 60%, 0.8) ` ,
78
+ textDecoration : `underline solid ${ underlineThickness } px ${ outliveColor } ` ,
72
79
} ) ;
73
80
emptyDecorationType = vscode . window . createTextEditorDecorationType ( { } ) ;
74
81
@@ -134,6 +141,7 @@ export function activate(context: vscode.ExtensionContext) {
134
141
) ;
135
142
vscode . window . onDidChangeTextEditorSelection (
136
143
( ev ) => {
144
+ const { displayDelay } = vscode . workspace . getConfiguration ( "rustowl" ) ;
137
145
if ( ev . textEditor === activeEditor ) {
138
146
resetDecoration ( ) ;
139
147
if ( decoTimer ) {
@@ -155,7 +163,7 @@ export function activate(context: vscode.ExtensionContext) {
155
163
if ( data . success ) {
156
164
updateDecoration ( ev . textEditor , data . data ) ;
157
165
}
158
- } , 2000 ) ;
166
+ } , displayDelay ) ;
159
167
}
160
168
} ,
161
169
null ,
0 commit comments