tlaplus / vscode-tlaplus

TLA+ language support for Visual Studio Code
MIT License
357 stars 33 forks source link

Add colored background to highlight changes to the state #344

Closed FedericoPonzi closed 1 month ago

FedericoPonzi commented 1 month ago

Looking for feedback to solve #250. This is adding a opaque background color to help spot removals, additions and updates.

Preview: image

---- MODULE 250Playground ----
EXTENDS Bags, Naturals

VARIABLE x, y

Init ==
    /\ x = [ k \in {<<"a", "b">>} |-> 1 ]
    /\ y = 1

Next == /\ x' = (x (+) [ k \in {<<"b", ToString(y)>>} |-> y ]) (-) [ k \in {<<"b", ToString(y-1)>>} |-> y-1 ]
        /\ y' = y + 1

Inv ==
    y < 5

====
---- CONFIG 250Playground ----
INIT Init
NEXT Next
INVARIANT Inv
====

image