Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode extension is over hinting, including variable #3278

Closed
4 tasks done
aboveyunhai opened this issue Oct 27, 2023 · 4 comments
Closed
4 tasks done

vscode extension is over hinting, including variable #3278

aboveyunhai opened this issue Oct 27, 2023 · 4 comments
Labels
enhancement New feature or request vscode

Comments

@aboveyunhai
Copy link

aboveyunhai commented Oct 27, 2023

UnoCSS version

not applicable, latest Unocss vscode extension v0.57.1

Describe the bug

The latest unocss vscode is running correctly, but it over hinting, cause confusion on reading regular variable, shouldn't it check string only?.
image

For the typescript, it's very tricky since it's a valid string, so I can't tell it's the intention, fixable or not, but I will leave it here as reference.

image

Reproduction

install the unocss vscode extension and use the example code from screenshot.

System Info

Windows 10

Validations

@louiss0
Copy link

louiss0 commented Nov 9, 2023

This is a problem that I see as well. I don't know why Uno does this.

@f820602h
Copy link

f820602h commented Dec 1, 2023

In single-file Vue development, this problem will also occur.
The underscore will appear in the text within the style section, even though it is not an UnoCSS class.
截圖 2023-12-01 上午11 56 49

@rick-ast
Copy link

I also get the unexpected hints in css file.
Screenshot 2023-12-28 at 08 09 14

@antfu antfu added enhancement New feature or request vscode labels Dec 28, 2023
@antfu
Copy link
Member

antfu commented Dec 28, 2023

This is how UnoCSS works by scanning for occurrence. I initially designed VS Code extension that way it's more consistent with the runtime behavior, but yeah I agree this can be annoying at some point. I think we could treat VS Code a bit, especially by only highlighting a certain context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vscode
Projects
None yet
Development

No branches or pull requests

5 participants