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 IntelliSense does not work if the configuration file is outside of the root directory #3009

Closed
4 tasks done
jozefmery opened this issue Aug 20, 2023 · 3 comments
Closed
4 tasks done

Comments

@jozefmery
Copy link

UnoCSS version

v0.55.2

Describe the bug

Placing the UnoCSS configuration file outside of the project root directory breaks the VSCode IntelliSense. Based on the extension's output, it seems that the extension correctly finds and loads the configuration. Also, I'm using the CLI for generation and it seems to work correctly.

Reproduction

  1. Move the UnoCSS configuration file from the project root /unocss.config.ts into a sub-directory, e.g., /foo/bar/unocss.config.ts
  2. Point the extension to the configuration file by adding the following line in your VSCode settings.json: "unocss.root": "foo/bar"
  3. Reload the editor (Close & Open VSCode, or F1 > Developer: Reload Window, or F1 > UnoCSS: Reload UnoCSS)
  4. The IntelliSense should be broken

System Info

No response

Validations

@harrytran998
Copy link

Same problem with me!

Do like the docs said (https://unocss.dev/integrations/vscode#config) - but no luck 😆. Hope team can fix this!

@darkyelox
Copy link

This happens to me too, the settings.json configuration seems to be recognized but the intellisense is not working until I move my config file to root and removed the settings.json property :/ this is a problem for monorepos

@Simon-He95
Copy link
Contributor

I think this issue could be closed

@zyyv zyyv closed this as completed Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants