Skip to content

feat(vscode): add advanced intellisense for css variable-based preset…#4916

Draft
vtestah wants to merge 2 commits into
unocss:mainfrom
vtestah:feat/vscode-4905-intellisense
Draft

feat(vscode): add advanced intellisense for css variable-based preset…#4916
vtestah wants to merge 2 commits into
unocss:mainfrom
vtestah:feat/vscode-4905-intellisense

Conversation

@vtestah
Copy link
Copy Markdown

@vtestah vtestah commented Sep 9, 2025

This PR implements the advanced IntelliSense discussed in #4905.

It resolves CSS variables and calc() expressions for presets like @unocss/preset-wind4, showing final computed values in tooltips instead of raw var() functions.

Core features:

  • Value Resolution: Computes CSS variables from theme, rules, and @property defaults.
  • Enhanced Tooltips: Hover shows commented rules (with rem-to-px, color hexes). Autocomplete shows final values or shortcut definitions.
  • Opt-in: The feature is enabled by a meta: { cssVarsIntelliSense: true } flag in a preset, ensuring no impact on existing presets.

The new logic is encapsulated in src/css-vars-intellisense/ for maintainability.

Closes #4905

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 9, 2025

Deploy Preview for unocss ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit aa2cf70
🔍 Latest deploy log https://app.netlify.com/projects/unocss/deploys/694e3152fe3ec100088f665a
😎 Deploy Preview https://deploy-preview-4916--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Dec 26, 2025

Open in StackBlitz

commit: aa2cf70

@ixycej12
Copy link
Copy Markdown

How long will it take to implement this preview feature?

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

Successfully merging this pull request may close these issues.

🚀 VS Code: Compute and display final CSS values from presetWind4's default theme in hover previews

3 participants