Giter Site home page Giter Site logo

vscode-css-blocks's Introduction

vscode-css-blocks

CSS Blocks support:

  • autocomplete
  • go to definition

Demo

Release Notes

vscode-css-blocks's People

Contributors

chriseppstein avatar vunguyentuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

chriseppstein

vscode-css-blocks's Issues

dashed idents

Block classes and states with a dash .foo-bar get inserted but are illegal syntax.

I think those should set insertText for the CompletionItem to ["foo-bar"].

Thoughts & Feedback

Hi @vunguyentuan,

Thank you for building this! It's very exciting. An IDE integration for CSS Blocks is one of the many things that being statically analyzable makes possible and I've been dreaming of it for a while now.

CSS Blocks is still being actively developed. And we expect to see some big changes.

Here's some things I think would make this more robust against those changes and/or for how it can integrate more effectively in the CSS Block's design:

Typescript

VSCode and CSS Blocks are both in typescript, so these should be really nice to use together and let the compiler help guide potential issues.

CSS Blocks Object Model

CSS Blocks has factory that given an import path will return back an object that represents the block. This also lets it handle transformations involving preprocessors while maintaining sourcemaps along the way.

The factory can be configured to load files from abstract locations (this will be important when it comes time to reference changes in a block that haven't been saved yet) and can maintain consistency throughout a request. This handles all the parsing of stylesheets. It even has a query language to find selectors matching a style.

I think it would be great if we could find a way to make this extension use css-blocks's internal data model for generating suggestions and finding the location for things like go-to-definition or code-lens.

Tests

I noticed there's no tests yet ๐Ÿ˜…

Next Steps?

It's so exciting to see this working. Did you try any of these things I suggested above? If so I'm curious what issues you bumped into. If not, do you have any specific concerns? I can help you get started on some of that if it feels like it's not well enough documented, etc.

I think with the kinds of changes I mention here, this would become a project we'd want to make part of our core set of released packages, if you're amenable to working with us on it there.

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.