@@ -41,6 +41,21 @@ const decoStyleStateVar = vscode.window.createTextEditorDecorationType({
41
41
} ,
42
42
} ) ;
43
43
44
+ const decoStyleStateVarImmutable = vscode . window . createTextEditorDecorationType ( {
45
+ borderWidth : '1px' ,
46
+ borderStyle : 'dotted' ,
47
+ //overviewRulerColor: 'blue',
48
+ overviewRulerLane : vscode . OverviewRulerLane . Right ,
49
+ light : {
50
+ // this color will be used in light color themes
51
+ borderColor : 'DarkOrchid'
52
+ } ,
53
+ dark : {
54
+ // this color will be used in dark color themes
55
+ borderColor : 'Orchid'
56
+ } ,
57
+ } ) ;
58
+
44
59
const decoStyleLightGreen = vscode . window . createTextEditorDecorationType ( {
45
60
borderWidth : '1px' ,
46
61
borderStyle : 'dotted' ,
@@ -115,6 +130,7 @@ const decoStyleBlueBoldForeground = vscode.window.createTextEditorDecorationType
115
130
116
131
var styles = {
117
132
decoStyleStateVar : decoStyleStateVar ,
133
+ decoStyleStateVarImmutable : decoStyleStateVarImmutable ,
118
134
decoStyleLightGreen : decoStyleLightGreen ,
119
135
decoStyleLightOrange : decoStyleLightOrange ,
120
136
decoStyleLightBlue : decoStyleLightBlue ,
@@ -473,6 +489,11 @@ class CreateDecoStyle {
473
489
knownValue = knownValue ? ` = **${ knownValue } ** ` : '' ;
474
490
}
475
491
492
+ if ( node . hasOwnProperty ( 'isImmutable' ) && node . isImmutable ) {
493
+ prefix = "**IMMUTABLE** " ;
494
+ decoStyle = "decoStyleStateVarImmutable" ;
495
+ }
496
+
476
497
return {
477
498
range : new vscode . Range (
478
499
new vscode . Position ( node . identifier . loc . start . line - 1 , node . identifier . loc . start . column ) ,
@@ -496,6 +517,11 @@ class CreateDecoStyle {
496
517
knownValue = knownValue ? ` = **${ knownValue } ** ` : '' ;
497
518
}
498
519
520
+ if ( svar . hasOwnProperty ( 'isImmutable' ) && svar . isImmutable ) {
521
+ prefix = "**IMMUTABLE** " ;
522
+ decoStyle = "decoStyleStateVarImmutable" ;
523
+ }
524
+
499
525
return {
500
526
range : new vscode . Range (
501
527
new vscode . Position ( node . loc . start . line - 1 , node . loc . start . column ) ,
0 commit comments