Fuzor for VS Code
TypeScript in Fuzor HTML components. Inside <script type="text/typescript">
blocks you get TypeScript highlighting, completion, hover, diagnostics, go-to-definition, find
references and rename, also across .html and .ts files. Markup keeps VS Code's built-in HTML
support.
The extension registers the fuzor-language-tools
plugin with VS Code's built-in TypeScript support for HTML files, colours TypeScript blocks, and
keeps VS Code's HTML formatter as the default for HTML. Its only code is a rename provider: VS
Code's HTML support also renames inside type="text/typescript" blocks, but only within one file,
so inside a block the extension answers with TypeScript's rename across files; on tags, HTML's
rename still applies.
Install
Install Fuzor from the Visual Studio Marketplace
(search for Fuzor in the Extensions view), or from a terminal:
code --install-extension zelavis.fuzor
Use
Your project's tsconfig.json must list its components, as apps from create-fuzor do:
{ "include": ["client/**/*.ts", "components/**/*.html", "pages/**/*.html"] }
VS Code's bundled TypeScript (version 6) is used unless you select the workspace version, which
must also be TypeScript 6.
Limits
TypeScript 7 has no plugin API yet. JavaScript blocks keep VS Code's built-in JavaScript support.
There is no ESLint integration for HTML components. Hovers inside a TypeScript block can show a
second, single-file card from VS Code's HTML support next to the TypeScript one. Like VS Code's
embedded JavaScript, a statement that runs into </script> on the same line keeps its colour to
the end of that line.