Giter Site home page Giter Site logo

vscode-styled-jsx's Introduction

⚠️ This repository is no longer actively maintained, since I no longer have a requirement for react and styled-jsx and I am unable to commit time to maintaining it. If you're interested in taking over, please let me know.

vscode-styled-jsx

Syntax highlighting for styled-jsx

Syntaxes files are inspired by vscode-styled-components Uses the CSS grammar from the Atom language-babel.

Plan

  • Add support for css attributes autocomplete
  • Add support for classNames autocomplete
  • fix too many interpolation includes in partterns

vscode-styled-jsx's People

Contributors

diagramatics avatar ifwu avatar jeddf avatar monotykamary avatar tusbar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-styled-jsx's Issues

can't make it work

Hi!

I'm having serious trouble making this extension work for me. After installing it simply does nothing.
I've tried it with every other extension disabled and still not working.
Could someone help me to debug this issue? I'm seriously missing that syntax highlighting.
VS Code Version: 1.25.1
And I use 'Javascript' as language mode.

screen shot 2018-08-09 at 8 11 16 pm

Repo is unmaintained: Better maintained repo

As @iFwu said in the top of the README.md file :

⚠️ This repository is no longer actively maintained, since I no longer have a requirement for react and styled-jsx and I am unable to commit time to maintaining it. If you're interested in taking over, please let me know.

Since there is not so much activity since then, I decided to take care of this VS Code extension and will try my best to maintain it, available there: https://github.com/Divlo/vscode-styled-jsx.

Add support for preprocessed CSS languages

styled-jsx supports plugins which allows for the use of multiple different languages (Stylus, Sass, PostCSS, etc.)

It would be cool to support multiple languages out of the box and be able to specify the language used in a project-specific configuration.

Doesn't syntax highlight when css.global`...` is used

The plugin doesn't do any syntax highlighting for either of these files:

/* @flow */

import css from 'styled-jsx/css';

export default css.global`
  foo {
    color: red;
  }
`;
/* @flow */

import {global} from 'styled-jsx/css';

export default global`
  foo {
    color: red;
  }
`;

It correctly syntax highlights if css`...` is used.

Syntax highlighting does not work

Using latest released version at this time.

Here's what it looks like:

Screenshot from 2019-09-03 09-26-55

I don't really have much more I can say about this, except that it was working not too long ago :/

Cmd+/ comment shortcut support

Would it be possible to support the comment shortcut (Cmd+/)?

Example: color: white; becomes {/*color: white;*/} instead of /*color: white;*/ when pressing Cmd+/

Not working when putting template literals on their own line

When opening the template literals at the same line as the opening <style jsx> tag everything works fine:

image

but after running Prettier it moves the JSX expression with the template literal to a new line and the highlighting stops working:

image

Thanks for your work on this plugin.

Seems to turn off when using `global`

See screenshots - with global prop - doesn't highlight:

screen shot 2018-06-22 at 13 59 46

Without - works:

screen shot 2018-06-22 at 13 59 57

I'm guessing this is a parsing issue in the plugin, but I'm not familiar enough with vscode plugins to know where to start looking to send a PR (sorry).

Add support for resolve

Resolve uses a different syntax and is also useful for those who use babel macros (such as create-react-app users).

import React from 'react'
import { resolve } from 'styled-jsx/macro'

const { className, styles } = resolve`main {
  margin-left: 64px;
  padding: 16px;
}`
export default ({ children }) => (
  <main className={className}>
    {children}
    {styles}
  </main>
)

No longer working

I'm not sure why but this extension has stopped working for me recently. I've done nothing other than upgrade VS Code to the latest version (currently v1.28.2). And I've tried reinstalling vscode-styled-jsx, but no luck.

Am I doing anything obviously wrong here?

image

I really miss the syntax highlighting and intellisense :/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.