@@ -41,6 +41,21 @@ const decoStyleStateVar = vscode.window.createTextEditorDecorationType({
4141 } ,
4242} ) ;
4343
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+
4459const decoStyleLightGreen = vscode . window . createTextEditorDecorationType ( {
4560 borderWidth : '1px' ,
4661 borderStyle : 'dotted' ,
@@ -115,6 +130,7 @@ const decoStyleBlueBoldForeground = vscode.window.createTextEditorDecorationType
115130
116131var styles = {
117132 decoStyleStateVar : decoStyleStateVar ,
133+ decoStyleStateVarImmutable : decoStyleStateVarImmutable ,
118134 decoStyleLightGreen : decoStyleLightGreen ,
119135 decoStyleLightOrange : decoStyleLightOrange ,
120136 decoStyleLightBlue : decoStyleLightBlue ,
@@ -473,6 +489,11 @@ class CreateDecoStyle {
473489 knownValue = knownValue ? ` = **${ knownValue } ** ` : '' ;
474490 }
475491
492+ if ( node . hasOwnProperty ( 'isImmutable' ) && node . isImmutable ) {
493+ prefix = "**IMMUTABLE** " ;
494+ decoStyle = "decoStyleStateVarImmutable" ;
495+ }
496+
476497 return {
477498 range : new vscode . Range (
478499 new vscode . Position ( node . identifier . loc . start . line - 1 , node . identifier . loc . start . column ) ,
@@ -496,6 +517,11 @@ class CreateDecoStyle {
496517 knownValue = knownValue ? ` = **${ knownValue } ** ` : '' ;
497518 }
498519
520+ if ( svar . hasOwnProperty ( 'isImmutable' ) && svar . isImmutable ) {
521+ prefix = "**IMMUTABLE** " ;
522+ decoStyle = "decoStyleStateVarImmutable" ;
523+ }
524+
499525 return {
500526 range : new vscode . Range (
501527 new vscode . Position ( node . loc . start . line - 1 , node . loc . start . column ) ,
0 commit comments