Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Universal.WebNew to Visual Studio Code? Get it now.
Universal.Web

Universal.Web

Andrew Ong

| (0) | Free
Browser module JSDoc hover, template parsing, HTML and binding completions, and diagnostics for Universal.Web.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Universal.Web for VS Code

HTML/CSS editing inside template strings, browser module JSDoc and navigation, project-aware completions, and live diagnostics. JavaScript, TypeScript, and HTML script blocks are supported, including imported html aliases and namespace imports from Universal.Web.Binding.

Tagged HTML is parsed as browser HTML fragments, including nested <template> contents, SVG, table fragments, and shadow-root templates. Local html helpers (including String.raw) and other libraries' html imports receive ordinary HTML completions and syntax warnings; Universal.Web binding templates retain their binding-specific assistance. Slots, parts, declarative shadow-root attributes, and shadowrootmode values are included. Completion and hover preserve source positions through JavaScript escapes and multiline expressions.

Embedded CSS in <style> blocks, inline style attributes, and css tagged strings receives theme-aware highlighting and literal color swatches/picker support. Hover class/id references to see source rules and conditions from linked stylesheets, CSS imports and modules, with source navigation and unsaved edits. Razor, EJS, Handlebars, JSP, Thymeleaf and Pug source adapters preserve literal markup while keeping backend expressions opaque. Set universalWeb.cssHighlighting to false to disable the added coloring; JavaScript's existing semantic provider is preserved.

Optional browser-connected previews show actual computed styles and dimensions, including open shadow roots. Configure public mounts, entry pages and the browser in .universalweb.json, then run Universal.Web: Preview Computed CSS in Browser. See the repository's configuration and workflow review for examples and qualification boundaries.

Browser module JSDoc appears on imported names and their uses, including libraries other than Universal.Web. The server resolves HTTP(S) and relative module URLs, inline HTML import maps (imports, scopes, and prefix mappings), and named/wildcard re-exports. Named imports, aliases, namespace members, and literal dynamic imports with destructured or namespace assignments are supported. Inline module scripts work without moving JavaScript into another file or installing an npm package.

Documentation is read from the module source, so the served JavaScript must retain JSDoc. This is documentation lookup, not a replacement JavaScript type checker. Computed imports, inferred object members, and complex lexical shadowing are outside its scope. Standalone JavaScript modules can inherit an import map through a transitive module graph from a unique open or configured entry page; ambiguous hosts are excluded. Conventional ASP.NET Core and Spring roots and explicit public mounts resolve browser URLs to source files. Remote sources are cached for five minutes and never executed. Failed or unavailable sources leave normal editor features available.

Use Universal.Web: Format Embedded HTML/CSS to format literal template content. Standard document/range formatting also exposes the shared formatter. universalWeb.formatOnSave is opt-in, so you can choose how it works alongside your existing formatter. Edits preserve interpolation programs, backend code, escapes, raw-text elements and significant text; this is conservative whitespace formatting, not whole-program JavaScript formatting. Synthetic Pug projections are not formatted.

Typing closes embedded source tags and indents new lines between matching tags or CSS braces. Matching tags/braces, depth colors, folding, selection expansion and local references/rename use source ranges. Run Universal.Web: Enable Linked Tag Editing to enable VS Code's language-specific editor.linkedEditing setting. universalWeb.autoCloseTags, embeddedIndentation and embeddedStructure control the added editing behavior; bracket colors honor editor.bracketPairColorization.enabled.

Inside embedded content, the normal comment and matching-bracket shortcuts work through dedicated commands. Expand HTML Abbreviation (Ctrl+Alt+E, Cmd+Alt+E on macOS) supports child/sibling elements, class/id and repetition, such as ul>li.card*3; it is a bounded subset of Emmet. JavaScript holes and attributes are excluded. Generic aliases with HTML/CSS-shaped literals receive inferred coloring; multiline shape inference can also color an untagged literal that begins with markup.

CSS completion covers common properties, values and custom properties; project styles supply class/id suggestions. Public asset paths have completion and source links. Static component() declarations and Custom Elements Manifests supply project component tags and members. The bounded project index scans up to 128 small source files and merges unsaved buffers; generated/dynamic declarations need explicit source metadata. Lightbulbs fix selected CSS typos, duplicate attributes and missing static-image alt attributes for review. Local rename updates a matched tag pair or a uniquely declared CSS custom property within one region; it does not rename every project selector or runtime element.

F12 follows browser module re-exports even without JSDoc, and opens remote source in a readonly document. Explain Resource Resolution shows public mounts, URLs, source files, import-map ownership and configuration errors. Slow remote lookups are cancellable and do not block local typing requests.

Install the VSIX for your operating system and architecture. It includes the uw server and its .NET runtime; no separate .NET or tool installation is needed. Each extension update also updates its bundled server. Version 0.1.0 qualifies Windows x64; other platform recipes require host qualification before publication. See Universal.Web.Build/README.md in the repository for packaging instructions.

universalWeb.toolPath and universalWeb.toolArguments provide an optional external tool override for development. Leave the path empty for normal use. Use Universal.Web: Restart Language Server after rebuilding an external tool. JavaScript expressions retain the editor's normal language service. The extension runs in trusted local and remote workspaces; remote installations need the extension package for the remote host's operating system and architecture.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft