You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emmet auto completing HTML tags instead of CSS #191
I cannot reproduce this, i get the css options first and emmet only if nothing else matches.
Could you try the latest version of this extension and re-open if it's still a problem?
Can confirm this is still occurring on both latest version of Code and Insiders, using the latest version of of vscode-styled-components. It only happens if you are working in a file with a JSX/TSX extension or have the language mode set to JavaScript React or TypeScript React.
@jasonwilliams anything with the colon syntax seems to cause it. For example, m:10 or d:f. Interestingly, df also causes issues. You can confirm that the emmet behavior is different if you run Emmet: Expand abbreviation or try the same thing from a CSS file.
at the moment the problem is still relevant.
the problem you quoted relates to the styles inside the <style> tag. And we are talking about styled-components here.
snippets now work strangely. for example when I write log I expect the console.log snippet to be at the top of the list. but he's at the bottom.
Yes, this is the only downside to this solution. Snippets appear at the bottom because ultimately, this is not a fix but just a simple workaround. This is why we still need a solid fix for this problem.
@NayamAmarshe@jt3k are you able to set up a small repo to use as a test case for this? I can’t reproduce this issue so it would help if we’re all looking at the same thing. This would really help push this forward
Thanks @rzhao271 that was useful.
I've updated the troubleshooting section of our README and that links to the upstream issues.
I think it's now safe to close this issue and instead point people in the right direction. Feel free to continue commenting if there's anything useful we should know.
After trying all the suggestions in this thread, none of them worked, but I realized that the auto-completion to HTML only happened when the suggestion box was shown (press Esc before Tab and the completion would work fine). Here is the config I needed in order to get Emmet to expand m:10 to margin: 10px; on Tab:
Activity
jt3k commentedon Jan 14, 2020
bump-up!
derek-watson14 commentedon Feb 2, 2020
bump again
raihan004 commentedon May 11, 2020
bump up again
jt3k commentedon May 17, 2020
bumped-up x2
steffenu commentedon Jun 15, 2020
yea
jt3k commentedon Jul 7, 2020
jasonwilliams commentedon Oct 21, 2020
I cannot reproduce this, i get the css options first and emmet only if nothing else matches.
Could you try the latest version of this extension and re-open if it's still a problem?
chuckhendo commentedon Nov 6, 2020
Can confirm this is still occurring on both latest version of Code and Insiders, using the latest version of of vscode-styled-components. It only happens if you are working in a file with a JSX/TSX extension or have the language mode set to JavaScript React or TypeScript React.
jasonwilliams commentedon Nov 6, 2020
@chuckhendo i have the suggestions but they’re below all the css ones so it’s not much of an issue for me. Do you see something different?
chuckhendo commentedon Nov 6, 2020
@jasonwilliams anything with the colon syntax seems to cause it. For example,
m:10ord:f. Interestingly,dfalso causes issues. You can confirm that the emmet behavior is different if you runEmmet: Expand abbreviationor try the same thing from a CSS file.jt3k commentedon Nov 16, 2020
the problem is still relevant. Are there any plans to fix these errors?
jasonwilliams commentedon Nov 16, 2020
@jt3k we're not sure how possible it is to stop emmet placing tags there so that's why nothing has happened yet.
We're always up for people contributing who want to try and fix this!
https://github.com/styled-components/vscode-styled-components/blob/master/CONTRIBUTING.md
chuckhendo commentedon Nov 24, 2020
@jasonwilliams I'm going to try to find some time to take a look at it. Can this issue be reopened?
14 remaining items
NayamAmarshe commentedon Mar 25, 2021
Here's a small fix, add this in your settings.json:
kandarp43 commentedon May 12, 2021
works perfect
jasonwilliams commentedon May 12, 2021
Can someone confirm this has fixed the issue microsoft/vscode#119736 if so I’ll close this
jt3k commentedon May 13, 2021
at the moment the problem is still relevant.
the problem you quoted relates to the styles inside the <style> tag. And we are talking about styled-components here.
jt3k commentedon May 13, 2021
snippets now work strangely. for example when I write
logI expect theconsole.logsnippet to be at the top of the list. but he's at the bottom.NayamAmarshe commentedon May 14, 2021
Yes, this is the only downside to this solution. Snippets appear at the bottom because ultimately, this is not a fix but just a simple workaround. This is why we still need a solid fix for this problem.
jasonwilliams commentedon May 14, 2021
@NayamAmarshe @jt3k are you able to set up a small repo to use as a test case for this? I can’t reproduce this issue so it would help if we’re all looking at the same thing. This would really help push this forward
rzhao271 commentedon May 14, 2021
I have commented on the upstream issue with repro steps and the root cause: microsoft/vscode#119736 (comment).
This bug is a subproblem of microsoft/vscode#51537.
jasonwilliams commentedon Aug 10, 2021
Thanks @rzhao271 that was useful.
I've updated the troubleshooting section of our README and that links to the upstream issues.
I think it's now safe to close this issue and instead point people in the right direction. Feel free to continue commenting if there's anything useful we should know.
JoshuaCWebDeveloper commentedon Jan 6, 2022
After trying all the suggestions in this thread, none of them worked, but I realized that the auto-completion to HTML only happened when the suggestion box was shown (press
EscbeforeTaband the completion would work fine). Here is the config I needed in order to get Emmet to expandm:10tomargin: 10px;onTab:kalal-rahul commentedon Apr 1, 2023
I was facing the same issue after my VS Code automatically upgraded to
March 2023 (version 1.77)Just to confirm that the issue was with the latest version, I downgraded my VS Code version to the below one and the
issue DID NOT appear there.
So seems like the this extension has some bugs with the latest VS Code version
March 2023 (version 1.77)jasonwilliams commentedon Apr 1, 2023
@kalal-rahul your issue is probably #387