Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameter highlight #729

Closed
alexr00 opened this issue Mar 11, 2019 · 8 comments
Closed

parameter highlight #729

alexr00 opened this issue Mar 11, 2019 · 8 comments

Comments

@alexr00
Copy link
Member

alexr00 commented Mar 11, 2019

From @bichikim on March 5, 2019 7:44

The image below is highlighting codes in Vscode now
image

I hope the parameters in the function are highlighted as shown below.

image

Copied from original issue: microsoft/vscode#69824

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

From @vscodebot[bot] on March 5, 2019 7:44

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

This looks like it's caused by an extension. I cannot reproduce this.

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

From @vscodebot[bot] on March 5, 2019 16:6

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

From @bichikim on March 8, 2019 2:22

@alexr00 Hi

The second image is function code in Webstorm.

Webstorm can find the parameter name in the function. It would be nice if Vscode supports a theme color scope such as "variable.parameter ..." for the parameter values.

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

I'm looking at the first image, and I'm not seeing the same syntax highlighting that is in your example. My example in VS Code:
image

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

From @bichikim on March 11, 2019 8:54

@alexr00 thank you for your time

your image is the same image as mine if you add code below to settings.json

            {
                "scope": [
                    "variable.parameter",
                ],
                "settings": {
                    "foreground": "#9AD100",
                    "fontStyle": "",
                }
            },

Vscode does not know whether "value" or "parameter" is "const" or "parameter" so Vscode highlights "values" and "parameters" of the same color.

But Webstorm does know that so parameter and value are not the same color at my second image.

Highlighting two variables in a different color helps to determine which is the parameter.

I ask the Vscode team to add this feature

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

This is a change request for the TypeScript TextMate grammar we use then. In this example on lines 2 and 4, parameter and value are both variable.other.readwrite.ts. The change would be to categorize these differently.

function myTest(parameter: any) {
	console.log(parameter);
	const value: string = 'value';
	console.log(value);
}

@alexr00
Copy link
Member Author

alexr00 commented Mar 11, 2019

I don't think this is possible with textmate grammars actually.

@alexr00 alexr00 closed this as completed Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant