dartvisual-studio-codeannotations

Parenthesis and scrollbar annotations


In my Visual Studio Code 1.100.0, I am having issues with parenthesis annotations and the scrollbar annotations with dart.

Starting point of my widget:

upper_portion

Ending point of my widget:

lower_portion

This is very helpful for me to quickly see the ending point of my created widget, particularly when there are multiple widgets of similar types but with different uses.

However, I was expecting this:

expected_behavior

I am wondering why the VS Code markings behave this way.


Solution

  • If I don't want to restart VS Code (since it's a pretty minimal concern for me).

    I will be looking for comments where there are brackets and/or parentheses (But usually, I'm only looking for an opening parenthesis),

    For example:

    I refactored the commenting style from this,

    // shape: RoundedRectangleBorder(
    //     side: BorderSide(
    //         color: isDarkMode
    //             ? const Color.fromARGB(190, 255, 193, 7)
    //             : Colors.lightBlue,
    //         width: 2.0),
    //     borderRadius: BorderRadius.circular(4)),
    

    into this,

    /// shape: RoundedRectangleBorder(
    //     side: BorderSide(
    //         color: isDarkMode
    //             ? const Color.fromARGB(190, 255, 193, 7)
    //             : Colors.lightBlue,
    //         width: 2.0),
    //     borderRadius: BorderRadius.circular(4)),
    

    Yet, somehow, the annotations and marking refresh their behavior and provide the expected marking and annotations.

    UPDATE: I found out that it seems it was a bug.

    I noticed that in VS Code, if I display two similar files (e.g., split right), I encountered misbehavior in code annotations, maybe it was just a bug.