登录 注册
其他 htmllanguage-serverlanguage-server-protocollsplsp-servertemplating-engine
1,405
Stars
76
Forks
9
Watchers
26
Open Issues
MIT
许可证
Zig
语言
2024-06-21
创建时间
2026-10-30
最近更新

项目能做什么

集成了校验、格式化、LSP 和模板语言库的 HTML 工具。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# SuperHTML
HTML Validator, Formatter, LSP, and Templating Language Library

## SuperHTML CLI Tool
The SuperHTML CLI Tool offers **validation** and **autoformatting** features for HTML files.

The tool can be used either directly (for example by running it on save), or through a LSP client implementation.

```
$ superhtml
Usage: superhtml COMMAND [OPTIONS]

Commands:
  check         Check documents for errors.
  fmt           Format documents.
  lsp           Start the Language Server.
  help          Show this menu and exit.
  version       Print the version and exit.

General Options:
  --help, -h        Print command specific usage.
  --syntax-only     Disable HTML element and attribute validation.
```

>[!WARNING]
>SuperHTML only supports HTML5 (the WHATWG living spec) regardless of what you put in your doctype (a warning will be generated for unsupported doctypes).

>[!WARNING]
>Templated HTML (Jinja2, Angular, Mustache, ...) is not yet supported when all validation rules are enabled, use `--syntax-only` (or the relative Extension Setting in VSCode) to limit validation to syntax errors to use SuperHTML with templated HTML documents.
>
> Compatibility with popular templating languages is being explored. 


### Diagnostics
SuperHTML validates not only syntax but also element nesting and attribute values.
No other language server implements the full HTML spec in its validation code.

![](.github/helix.png)


### Autoformatting
The autoformatter has two main ways of interacting with it in order to request for horizontal / vertical alignment.

1. Adding / removing whitespace between the **start tag** of an element and its content.
2. Adding / removing whitespace between the **last attribute** of a start tag and the closing  `>`.


>[!TIP]
>Consider using `superhtml fmt --check` in your CI to enforce every change to be performed on normalized HTML files. This is a technique commonly used in Zig (and Go) for source code that can also help streamline frontend development.


#### Example of rule #1
Before:
```html
<div> <p>Foo</p></div>
```

After:
```html
<div>
    <p>Foo</p>
</div>
```

##### Reverse

Before:
```html
<div><p>Foo</p>
</div>
```

After:
```html
<div><p>Foo</p></div>
```

### Example of rule #2
Before:
```html
<div foo="bar" style="verylongstring" hidden >
    Foo
</div>
```

After:
```html
<div foo="bar" 
     style="verylongstring" 
     hidden
>
    Foo
</div>
```

#### Reverse

Before:
```html
<div foo="bar" 
     style="verylongstring"
     hidden>
    Foo
</div>
```

After:
```html
<div foo="bar" style="verylongstring" hidden>
    Foo
</div>
```

### Download
See the Releases section here on GitHub.

### Editor support
#### VSCode
Install the [Super HTML VSCode extension](https://marketplace.visualstudio.com/items?itemName=LorisCro.super) (doesn't require the CLI tool as it bundles a WASM build of the language server).

#### Neovim
This guide assumes that you are already familiar with Neovims built-in package manager [Pack](http
阅读完整原文

项目深度分析 AI 生成

高级模板引擎与可访问性 (a11y/SEO) 企业级 Linter 扩展

产品构想基于 SuperHTML 原生性能和 WASM 编译能力,扩展对主流后端模板(Jinja2、Django、Blade、Go html/template)的完整解析支持,并附加 WCAG 可访问性及 SEO 结构化错误检查,提供商业许可证或高级规则包。
核心功能模板语法无损解析、WCAG 2.1 规则深度校验、SEO 标签层级完整性分析、CI 自动化合规报告生成器(CLI/GitHub Action)。
目标用户重视可访问性法规合规与 SEO 表现的中大型企业、跨境电商及 SaaS 研发团队。
难度/周期高 · 3 - 6 个月 · 成本:开发机器、Zig/C/WASM 工具链、合规标准调研、持续集成测试集群。
收费模式核心功能开源,企业级 a11y/SEO 规则库与 CI 插件采用商业订阅/团队授权(Per-Seat/Per-Repo)。
竞争风险README 明确指出目前模板支持不完善(需开启 --syntax-only),模板语法各异且复杂度高,规则解析引擎开发工作量巨大。
依据 数据支持的判断

开发者工具生态订阅版 (IDE 插件高级功能 & 云端托管验证 API)

产品构想将 SuperHTML 打包为轻量级 API 服务及深度集成的 VSCode/JetBrains 商业版插件,提供一键修复复杂 HTML 结构、自动化重构及企业共享配置同步。
核心功能无缝集成主流编辑器、团队共享代码规范配置同步、一键自动化修复结构警告(如非法嵌套自动包裹或解构)。
目标用户高频编写 HTML/Web Components 的专业前端开发者、独立开发者及小型开发工作组。
难度/周期中等 · 1 - 3 个月 · 成本:VSCode/JetBrains 开发者账号年费、小型 API 服务托管服务器(初期低成本)。
收费模式按月订阅制(Freemium 模式),免费提供基础格式化与语法检查,高级重构与云同步配置收费。
竞争风险开源社区习惯使用免费的 Prettier/HTML-LSP,若无压倒性生产力提升,个人付费意愿推测极低。
依据 AI推测

CI/CD 提速与网页质量门禁 SaaS (GitHub Marketplace Action)

产品构想利用 SuperHTML 高性能 CLI 和低资源占用特性,打造专为 CI/CD 优化的网页质量审计门禁,比 Node.js 方案执行更快、资源占用更低,提供汇总看板与历史趋势追踪。
核心功能极速静态 HTML 批量校验与格式化检查、PR 自动批注与建议、质量评分卡与合规率趋势看板。
目标用户拥有大型静态站点、多页面应用(MPA)或大量文档站的 DevOps 团队及技术负责人。
难度/周期中等 · 2 - 4 个月 · 成本:前端看板托管与数据库(Supabase/PostgreSQL)、CI Runner 消费测试。
收费模式GitHub Marketplace SaaS 订阅(基于并发检查量或仓库数量分级收费)。
竞争风险需要与现有基于 Node.js/HTMLHint 等开源免费工作流竞争,用户替换成本和认知惯性较大。
依据 尚需验证的假设
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
zed-extensions/superhtml 中文介绍暂未生成
SuperHTML support for zed
13 Rust
yinqiao/superhtml 中文介绍暂未生成
superhtml
5 HTML
sandramedina/superhtml 中文介绍暂未生成
Created with CodeSandbox
0 -
dskrenta/superhtml 中文介绍暂未生成
SuperHTML - Be proactive, not reactive
0 JavaScript
mahmood726-cyber/Superhtml- 中文介绍暂未生成
0 HTML
Justsean18/superhtml 中文介绍暂未生成
0 HTML
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 2024-06-21,近 30 天仍在推送,发布过 18 个 Release
社区活跃Star 1,405 / Fork 76 / Issue 26(数据支持,可自行核实)
许可证MIT
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。