mjbvz/vscode-lit-html
关于
为 JavaScript 和 TypeScript 的带标签模板字符串中的 HTML 添加语法高亮。
网站与应用开发可以做什么
- Syntax highlighting of inline html blocks.
- IntelliSense for html tags and attributes.
- Quick info hovers on tags.
- Formatting support.
实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Adds syntax highlighting and language support for html inside of JavaScript and TypeScript tagged template strings, such as used in lit-html and other frameworks.

Features
- Syntax highlighting of inline html blocks.
- IntelliSense for html tags and attributes.
- Quick info hovers on tags.
- Formatting support.
- Auto closing tags.
- Folding html.
- CSS completions in style blocks.
- Works with literal html strings that contain placeholders.
Usage
The lit-html extension adds highlighting and IntelliSense for lit-html template strings in JavaScript and TypeScript. It works out of the box when you use VS Code's built-in version of TypeScript.
If you are using VS Code 1.30 or older and are using a workspace version of typescript, you must currently configure the TS Server plugin manually by following these instructions
Configuration
You can either configure this plugin using a tsconfig or jsconfig as described here, or configure the plugin using VS Code. This requires VS Code 1.30+ and TS 3.2+. Note the VS Code based configuration override the tsconfig or jsconfig configuration.
Tags
This extension adds html IntelliSense to any template literal tagged with html or raw:
import {html} from 'lit-html'
const a = html`
<div></div>
`
You can enable IntelliSense for other tag names by settings "lit-html.tags":
"lit-html.tags": [
"html",
"template"
]
Formatting
The plugin formats html code by default. You can disable this by setting "lit-html.format.enabled": false:
"lit-html.format.enabled": false
探索相关项目
加载中…