sveltejs / language-tools

The Svelte Language Server, and official extensions which use it
MIT License
1.19k stars 195 forks source link

Class completion for CSS #84

Open icebr9 opened 4 years ago

icebr9 commented 4 years ago

Describe the bug Not quite sure if its within the scope of the Svelte plugin but:

If you have:

 <div class="form-field"></div>

And try to do class selector within the style tag like:

<style>
.form-field {
color: red;
}
</style>

Just starting with "." in the <style> gives you gibberish suggestions for autocompletion.

Expected behavior I've tried the same within normal .html file and behavour there is as such: "form" selector works normally, but for words starting with "." it is completly disabled, same with #.

It would be nice to have "class names intellisense" for svelte components but disabling bad autocompletion is ok as well..

Screenshots If applicable, add screenshots to help explain your problem. image

System (please complete the following information):

dummdidumm commented 4 years ago

The gibberish part was partly addressed in #82 and will be further tackled by #57. The autocompletion part is a new feature that is not implemented yet.

gevera commented 3 years ago

This is really useful to have it working out of the box. Right now I have to switch back and forth from HTML to svelte extensions just to get the autocomplete working

jasonlyu123 commented 3 years ago

I think you have another extension that provides CSS class completions for html. For example, vscode-html-css or IntelliSense for CSS class names in HTML

yousufiqbal commented 1 year ago

Any progress on this?

ayuancool commented 5 months ago

Any progress on this?