kevin-mueller / HtmlCssClassCompletion

A Visual Studio 2022 extension, that improvies the exisiting intellisense of css classes for html-like languages.
MIT License
38 stars 2 forks source link

Visual Studio 2022 - no css intellisense #13

Closed jassent closed 2 years ago

jassent commented 2 years ago

First, thank you so much for trying to tackle this problem of CSS intellisense in Blazor. I installed the extension, rebooted the computer. The css intellisense isn't showing. I tried copying a bootstrap.css file directly into wwwroot and it doesn't load. Once I saw a background task message that said something like 9,700 classes were found. Subsequent executions of the "Scan all Projects for CSS Classes" causes the background task to flicker but not actually run and no results are shown in the background task status message. I even tried deleting the .vs folder with no luck.

This is a NET6 Blazor Server project using the extensions installed from the Visual Studio Marketplace (1.14.1). Other text processor extensions (like rainbow braces and file icons) are working just fine as is intellisense for everything but css.

Is there any way to force the scan to actually run or verify that it ran?

This screenshot shows a css file that should be picked up:

2022-09-07_15-50-12

kevin-mueller commented 2 years ago

Hi, thanks for creating this issue!

I don't think that the scanning is the problem. The status bar of VS is pretty "bugged", meaning the text will not always be shown, even if the scan is successful.

I think the problem has more to do with the actual displaying of the intellisense. To be honest, I don't know what would happen, if one would use this extension along with other similar extensions. Maybe you could try disabling the other extensions and check if the issue still persists?

The only other thing I can think of, that you could try, is to debug the extension yourself. You could do this by cloning this repo and running it in VS2022. Just make sure you run the project in the "HtmlCssClassCompletion22" folder, and that you have the "Visual Studio Extension Development" option installed in the VS installer. You can then try to set a breakpoint on the completion provider class (line 68).

Let me know if you found a solution! @jassent

jassent commented 2 years ago

Thank you for the reply. I do appreciate the work you have done to put the extension out there.