robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
177 stars 14 forks source link

[Enhancement] Enable Bracket Coloring in Keyword Arguments for Enhanced Readability #229

Closed d-biehl closed 7 months ago

d-biehl commented 7 months ago

Description

Currently, our codebase does not support bracket coloring within the arguments of function calls, specifically in keyword arguments. This feature can significantly improve code readability, especially in complex functions with nested structures or multiple keyword arguments.

Feature Request

I propose to implement bracket coloring in keyword arguments. This feature would allow developers to quickly identify matching brackets, reducing the cognitive load when parsing through code and debugging.

Expected Behavior

When implemented, developers should see different colors for matching brackets within the arguments of a function. This should apply universally across all functions, including those with nested brackets and multiple layers of function calls.

Current Behavior

As of now, brackets within keyword arguments remain the same color, making it challenging to distinguish between different levels of nested arguments or to quickly identify matching pairs.

Desktop

gohierf commented 7 months ago

Works like a charm thanks!

image

gohierf commented 7 months ago

Although I have a question...

Is there a particular reason why the brackets are in red for inline python evaluation in VAR statements?

image

I guess I will get used to it, but for now I think there is an error each time I see one ^^.

Also, I am a wondering why the two consecutive VAR statements in the above screenshot do not have the same brackets colors. It feels like I forgot to close a bracket somewhere...

gohierf commented 7 months ago

Actually, the coloring changes if there is comment with brackets after the VAR statement...

image

gohierf commented 7 months ago

Yes, red is the color that is usually showed for missing brakets.

image

d-biehl commented 7 months ago

this should be fixed in the next release