Closed fatlinesofcode closed 4 years ago
What plugin version are you using? There was an issue that prevented the plugin from working in 2019.3 but it was fixed in plugin v. 1.0.11: https://github.com/styled-components/webstorm-styled-components/issues/72
im using plugin v1.1
@fatlinesofcode, It seems to work for me with the same versions and the same code sample. Are there any exceptions in IDE logs (you can view them via Help Menu -> Show Log)?
Is the example above enough to reproduce the issue for you in a new project or is there maybe something else missing from the example?
hi @undeadcat I cant see any exceptions in the log.
I seem to be getting css suggestions but no syntax highlighting 🤔
I'm on mac and used latest styled-components v5-rc2 (if that makes any difference)
Based on the latest screenshot where you're seeing completion and a red color picker icon on the gutter next to background-color: red
, it seems likely that this plugin is correctly marking the string as styled-components.
This plugin only marks certain strings as styled-components, highlighting individual syntax elements inside them is the IDE's job and may depend on things like the particular IDE color scheme used.
Can you see if the issue exists with a different editor color scheme?
thanks @undeadcat , yes looks like the issue related to the custom them i have. Plugin works fine with any of the default themes. Css and Scss files work fine with my custom theme. Any ideas on how I can fix my theme to also work with the plugin?
@fatlinesofcode, Unfortunately, I can't say for sure. Try it out with different CSS-related settings and different colors for JS strings. Or try the WebStorm support forum: https://intellij-support.jetbrains.com/hc/en-us/community/topics/200367229-WebStorm
adding the fix here for archives :
In language injections, foreground color is normally taken from the injected language highlighting settings, unless the color is specified explicitly in Preferences | Editor | Colors & Fonts | General / Code / Injected language fragment, Foreground.. In my scheme I had it set to #F8F8F2. Clearing the checkbox should fixed the issue
I just updated to PhpStorm 2019.3 and the highlight doesnt seem to work for me. Was working fine in 2019.2