Add descriptions to your variables so that you can remember what they are for when the variable names remain incapable.
-
Make sure you have VS Code & Typescript installed.
-
Clone this repo
-
Open command line inside the clone.
-
Type
code .
which will open the VS Code in the current directory. -
Press
F5
wich will open VS Code with the extension. -
Press
Ctrl + Shift + P
and typeVComment
to run the extension.
The extension is tested with:
- Javascript
- Python
Description can be added by adding a comment above the variable you want to describe along with @ (at) character followed by the description itself.
// @Array of indices to specify in which order the vertices will be processed
var indices = [0, 1, 2, 0];
Then, when the variable is hovered, its description will be available on the pop-up.
-
Multiple declaration (i.e. var x, y) is not supported.
-
Only functional scopes are considered while assigning comments to variables. Block scopes are not considered yet. That is, if two variables with the same name are defined in a function, their variable descriptions won't be as expected even if they are under different block scopes (i.e. if, while).