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 #69824

Closed
bichikim opened this issue Mar 5, 2019 · 10 comments
Closed

parameter highlight #69824

bichikim opened this issue Mar 5, 2019 · 10 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@bichikim
Copy link

bichikim commented Mar 5, 2019

The image below is highlighting codes in Vscode now
image

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

image

@vscodebot
Copy link

vscodebot bot commented Mar 5, 2019

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

@aeschli aeschli assigned alexr00 and unassigned aeschli Mar 5, 2019
@alexr00 alexr00 added the *caused-by-extension Issue identified to be caused by an extension label Mar 5, 2019
@alexr00
Copy link
Member

alexr00 commented Mar 5, 2019

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

@alexr00 alexr00 closed this as completed Mar 5, 2019
@vscodebot
Copy link

vscodebot bot commented Mar 5, 2019

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!

@bichikim
Copy link
Author

bichikim commented Mar 8, 2019

@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

alexr00 commented Mar 8, 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

@bichikim
Copy link
Author

bichikim commented Mar 11, 2019

@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

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

alexr00 commented Mar 11, 2019

Actually, I don't think this is possible with TextMate. Duplicate of #50140.

@dimaMachina
Copy link

@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

that's the only reason I can't go over from WebStorm to VSCode, this is overkill ☝️

@bichikim
Copy link
Author

@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

that's the only reason I can't go over from WebStorm to VSCode, this is overkill ☝️

I think so.

@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

4 participants