-
-
Notifications
You must be signed in to change notification settings - Fork 779
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 does not provide intellisense for shortcuts or rules added in custom preset. #3000
Comments
me too bro~ |
this is still not resloved by #3005 . i updated |
You are right, I am sure that to address this issue, changes need to be made here. It appears that making it detect changes to the |
i could not find a |
Oh, I mean Currently the extension only reload config on changes to the config file ( I'm not sure, but I think in general, custom preset usually would be another standalone library. So most people will not have a need to auto-reload presets. If you need to auto reload config like shortcuts, the easiest way is to write everything in |
the |
I found that when the custom preset rules are changed, hmr cannot be triggered. It may be that unocss does not monitor the changes of the preset files in config? |
I think this issue could be closed |
UnoCSS version
0.55.1
Describe the bug
Shortcuts and rules added in custom preset files (which are defined in
configDeps
vite plugin option and imported touno.config.ts
) work in the resulting app, but don't have autocomplete, unless VSCode extension is reloaded with the reload command.Reproduction
I tried to reproduce it in stackblitz, but that apparently doesen't use the VSCode extension (i got no autocomplete at all), and the playground does not allow creating arbitrary ts files to import in the config.
Anyway, i made the basic repro in stackblitz, you can download it and open in VSCode.
How to repro:
https://stackblitz.com/edit/unocss-unocss-i31ibt?file=uno.config.ts
run
UnoCSS: reload
command to load the unocss extension LSP (workaround for extension version 0.55.1)add a new shortcut / rule in the custom-preset file.
try using it in the code; it will work, but you will not get intellisense for it
current workaround: if you define your shortcuts / rules directly in
uno.config.ts
, you will get intellisense immediatelyrun
UnoCSS: reload
command, you now have intellisenseSystem Info
Windows 10, Vivaldi, svelte
Validations
The text was updated successfully, but these errors were encountered: