Comments (6)
I decided to take a stab at some meager syntax highlighting support for Atom. I'm happy to announce it was easier than anticipated.
This Atom package basically provides default javascript support with css syntax highlighting for anything inside the tagged string template csjs``.
Lemme know what you think!
https://github.com/neurosnap/language-csjs
https://atom.io/packages/language-csjs
It was really easy to include syntax highlighting from other languages in Atom, so this package could be use for other template strings pretty easily.
from csjs.
I wanted to also add that I managed to get autocomplete support for CSJS files in Atom as well. It is a separate package:
Syntax highlighting works with javascript expressions now as well:
To clarify, this will only work when the language selected for the file is CSJS
.
from csjs.
I ported @neurosnap's syntax highlighter to VS Code:
https://github.com/colejd/vscode-language-csjs
It's not totally done yet -- it seems that for highlighting JS-in-CSS-in-JS using a TextMate grammar like VS Code or Atom does, you basically need to copy the entire CSS grammar and figure out the places where a ${}
block might appear. If anyone knowledgeable about TextMate grammars stumbles on this, I'd really appreciate some help!
from csjs.
@scott113341 posted a cool way to get CSS syntax highlighting with WebStorm/IntelliJ IDE:
#28 (comment)
Other than that, it'd be cool for some generic way to get syntax highlighting within template strings. For example HTML syntax highlighting with https://github.com/substack/hyperx or CSS within CSJS. But at this time I'm not aware of any way to do that in editors other than IntelliJ.
from csjs.
Wow, that is super awesome! I'll have to try it out (and add it to the docs)
from csjs.
I've noticed that Atom, by default (using dark theme), will use the css syntax if the tag method is called css
, instead of csjs
. Unfortunately, even if I create an alias in my code, some plugins (like the babel-plugin-csjs-postcss) are counting on the tag being named csjs.
Is there an easier way to handle this besides forking the plugin?
from csjs.
Related Issues (20)
- Vote for adding support in IntelliJ IDEA HOT 4
- Using with browserify+babelify doesn't add styles HOT 2
- Support for more browsers HOT 4
- react-csjs HOT 2
- Get extended(?) CSS? HOT 1
- Is it possible to define #id style even if that's considered bad practice? HOT 4
- Cannot use `style.css_class_name` syntax directly with React 15.3.1 HOT 4
- Is it possible to use nested SASS/SCSS-like styles? HOT 2
- How to define complex selectors for global styles? HOT 1
- Dead code elimination HOT 4
- Is there any way to compress string literals? HOT 2
- Rule-level syntax/package(s) for buildtime/runtime conversion to style objects
- Helper method for getting true string class names HOT 1
- Document syntax highlighting/IDE integration options
- Document community packages
- Linting HOT 1
- Release noScope? HOT 11
- Status of CSJS? HOT 1
- "observables" in csjs
- Scoped multi-valued animations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csjs.