vscode-css-blocks
CSS Blocks support:
- autocomplete
- go to definition
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"]
.
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:
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 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.
I noticed there's no tests yet
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.