Closed smeijer closed 5 years ago
I've written a quick patch that configures injections in <style jsx>...</style>
tags (meaningful part is styledJsxTag
method).
I don't think it's a good idea to merge it into this plugin though. Simply for the reason that different frameworks will change their APIs at different times for and different reasons - leading to a plugin having a dependency on multiple different release cycles, higher chance of stuff breaking, etc. (if anyone has a different opinion, please share it!)
Feel free to do anything you like with the patch - fork the repo, apply the patch and use it for yourself / publish the result as a plugin :)
You could also use the method described in https://www.npmjs.com/package/styled-jsx#webstormidea to configure injections using //language
comment
I don't think it's a good idea to merge it into this plugin though. Simply for the reason that different frameworks will change their APIs at different times for and different reasons - leading to a plugin having a dependency on multiple different release cycles, higher chance of stuff breaking, etc.
I agree, that should really be its own plugin.
Would be awesome if this plugin could also add support for the
<style>
tag.I'm using https://github.com/zeit/styled-jsx. And their
css
helper is supported by this project, but the more generic<style>
tag isn't highlighted.