-
Notifications
You must be signed in to change notification settings - Fork 129
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
Mark JSX components differently from standard HTML tags #415
Comments
The request here would be to mark custom component tags differently from html tags. Right now, both are scoped the same, for example:
When I mentioned this to @mhegazy, I believe he suggested that this could be as simple as seeing if the first letter of the tag is capitalized. |
I agree. First letter being capitalized would be a pretty dead giveaway along with tags that contain object dot notation: |
I tried this in atom with the babel plugin. For the jsx
For the jsx
|
So it might only have to do with the syntax highlighting then, if it's already making the distinction. |
Yes, I suspect so. This means that the highlighting won't be right all the time, but it should work in common cases fairly well. Here's what I believe is the implementation of this in the babel grammar: https://github.com/gandm/language-babel/blob/dbb88f69aaf09bf30e517d6dc1c8144467743299/grammars/Babel%20Language.json#L2183 and here's where I think we would need to update the Typescript react grammar : https://github.com/Microsoft/TypeScript-TmLanguage/blob/master/TypeScriptReact.YAML-tmLanguage#L163 |
Fixes microsoft#415 Adds an extra marker for tsx tags that are likly a javascript/typescript class instead of a standard html element Update tests
Fixes microsoft#415 Adds an extra marker for tsx tags that are likly a javascript/typescript class instead of a standard html element
Fixes microsoft#415 Adds an extra marker for tsx tags that are likly a javascript/typescript class instead of a standard html element
I'm not sure why this is closed. I just tried to move to VSCode again from Atom and this still isn't fixed. @waderyan any insights here? For someone using JSX and React, this is very sad experience :( |
@tannerlinsley can you take a screenshot of what you are seeing? Also please confirm you are on the latest version of VS Code. |
Confirmed latest version. The screenshots above are still representative of
what I am seeing
…On Thu, Jun 8, 2017 at 4:25 PM Wade Anderson ***@***.***> wrote:
@tannerlinsley <https://github.com/tannerlinsley> can you take a
screenshot of what you are seeing? Also please confirm you are on the
latest version of VS Code.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#415 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFUmCcEBGNlQdz43VZnLnhU-4Zko3l5Sks5sCHTYgaJpZM4L4zqA>
.
|
@mjbvz this seems to have shown up again. |
@tannerlinsley Are you using VSCode 1.13? |
Yes I am 😊
…On Thu, Jun 8, 2017 at 7:16 PM Matt Bierner ***@***.***> wrote:
@tannerlinsley <https://github.com/tannerlinsley> Are you using VSCode
1.13?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#415 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFUmCZfK5DXMAp3SL3ceYqNALQzHApXNks5sCJzmgaJpZM4L4zqA>
.
|
@tannerlinsley What theme are you using? |
Closing as this has been fixed for the included vs code themes |
This feature is missing from November version (1.18)!? |
From @tannerlinsley on January 18, 2017 19:14
This is no so in Atom (which is honestly the last thing keeping me from moving all the way to vscode):
It doesn't seem to be fixed by using any theme, or installing the https://github.com/dzannotti/vscode-babel extension.
Any ideas?
Copied from original issue: microsoft/vscode#18752
The text was updated successfully, but these errors were encountered: