mint-lang / mint-vscode

VS Code Extension for Mint programming language
https://marketplace.visualstudio.com/items?itemName=mint-lang.mint
31 stars 10 forks source link

CSS highlighting & autocomplete #3

Closed lukepighetti closed 3 years ago

lukepighetti commented 4 years ago

What do we need to enable CSS highlighting & autocomplete in syntax highlighting? Can we somehow pipe Emmet in?

s0kil commented 4 years ago

CSS highlighting could be done similar to how we handle HTML, as an embedded language

Autocomplete would be more difficult, and I would like for this feature to be implemented first. This would allow the language server to provide smart results based on the context. For example, we would know that width accepts CSS Units and we could also provide autocomplete when using arguments:

  style base(color : String) {
    color: #{color};
    width: #{color} <- color does not make sense here
  }
s0kil commented 4 years ago

We could use something like this, how HTML handles <style> tag highlighting.

lukepighetti commented 4 years ago

Honestly if we highlight the css-property part of css-property: value; that would be a worthy improvement without getting into the nitty gritty. That would at least match the formatting on https://mint-lang.com website.

I didn't investigate what you suggested, though.

gdotdesign commented 3 years ago

@s0kil @lukepighetti I think with #21 this issue is resolved?

lukepighetti commented 3 years ago

As pictured in #21 this issue is resolved