Files
zed/docs/src/languages/html.md
T
gusmcgee 8d541bcc9b Fix broken links and stale content in docs (#65490)
## Summary

Fixes broken links in `docs/src`. Notes:

- **Rego:** pointed to `open-policy-agent/zed-rego` (same extension,
moved from `StyraInc`), but it was dropped from the registry in
zed-industries/extensions#7599. The Rego page may need removing.
- **Roc:** removed `roc_language_server` from setup; the extension now
runs `roc experimental-lsp`.
- **Meson:** `jobpaardekooper/zed-meson` is the registry's replacement
(zed-industries/extensions#4980).
- **Removed:** Gemini gemtext (dropped from registry) and the Sweep blog
link (site gone, [archived
copy](https://web.archive.org/web/20260806152854/https://blog.sweep.dev/posts/oss-next-edit)).

## Testing

Ran a link checker over `docs/` and checked each new target by hand.
Clicked through the fixed links with `mdbook serve docs`.

## Self-review

- [ ] I've reviewed my diff for quality, security, reliability, and
performance.
- [ ] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [ ] Tests cover the new or changed behavior.

Used Claude to find and verify the links; I reviewed each change.

Release Notes:

- N/A

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
2026-10-13 10:34:19 +00:00

3.1 KiB

title, description
title description
HTML Configure HTML language support in Zed, including language servers, formatting, and debugging.

HTML

HTML support is available through the HTML extension.

This extension is automatically installed, but if you do not want to use it, you can add the following to your settings:

{
  "auto_install_extensions": {
    "html": false
  }
}

Formatting

By default Zed uses Prettier for formatting HTML.

Configure formatting in Settings ({#kb zed::OpenSettings}) under Languages > HTML, or add to your settings file:

  "languages": {
    "HTML": {
      "format_on_save": "off",
    }
  }

You can still trigger formatting manually with {#kb editor::Format} or by opening the command palette ({#kb command_palette::Toggle}) and selecting "Format Document".

LSP Formatting

To use the vscode-html-language-server language server auto-formatting instead of Prettier, configure the formatter in Settings ({#kb zed::OpenSettings}) under Languages > HTML, or add to your settings file:

  "languages": {
    "HTML": {
      "formatter": "language_server",
    }
  }

You can customize various formatting options for vscode-html-language-server via your Zed settings.json:

  "lsp": {
    "vscode-html-language-server": {
      "settings": {
        "html": {
          "format": {
            // Indent under <html> and <head> (default: false)
            "indentInnerHtml": true,
            // Disable formatting inside <svg> or <script>
            "contentUnformatted": "svg,script",
            // Add an extra newline before <div> and <p>
            "extraLiners": "div,p"
          }
        }
      }
    }
  }

Using the Tailwind CSS Language Server with HTML

To get all the features (autocomplete, linting, etc.) from the Tailwind CSS language server in HTML files, you need to configure the language server so that it knows about where to look for CSS classes by adding the following to your settings.json:

{
  "lsp": {
    "tailwindcss-language-server": {
      "settings": {
        "experimental": {
          "classRegex": ["class=\"([^\"]*)\""]
        }
      }
    }
  }
}

With these settings, you will get completions for Tailwind CSS classes in HTML class attributes. Examples:

<div class="flex items-center <completion here>">
  <p class="text-lg font-bold <completion here>">Hello World</p>
</div>

See also