docs: Add Tailwind CSS LSP configuration for Gleam (#58115)

Documents how to configure the Tailwind CSS language server for Gleam,
and updates the link on the Tailwind landing page to anchor at the new
section so it matches the pattern used for Astro, ERB, HEEx, HTML,
TypeScript, JavaScript, PHP, Svelte, and Vue.

The config follows what was documented in #43968 when Gleam was added to
`tailwind.rs`.

Refs: #43969

Release Notes:

- N/A

---------

Co-authored-by: Kaedin Hano-Hollis <180361443+kaedinhanohano@users.noreply.github.com>
Co-authored-by: Kunall Banerjee <hey@kimchiii.space>
This commit is contained in:
Kaedin 2026-07-06 03:30:01 -07:00 committed by GitHub
parent 159246f008
commit c545fb67d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 26 additions and 1 deletions

View file

@ -10,6 +10,31 @@ Gleam support is available through the [Gleam extension](https://github.com/glea
- Tree-sitter: [gleam-lang/tree-sitter-gleam](https://github.com/gleam-lang/tree-sitter-gleam)
- Language Server: [gleam lsp](https://github.com/gleam-lang/gleam/tree/main/compiler-core/src/language_server)
## Using the Tailwind CSS Language Server with Gleam
To get all the features (autocomplete, linting, etc.) from the [Tailwind CSS language server](https://github.com/tailwindlabs/tailwindcss-intellisense/tree/HEAD/packages/tailwindcss-language-server#readme) in Gleam files, you need to enable the language server for Gleam and configure where it should look for CSS classes by adding the following to your `settings.json`:
```json [settings]
{
"languages": {
"Gleam": {
"language_servers": ["tailwindcss-language-server", "..."]
}
},
"lsp": {
"tailwindcss-language-server": {
"settings": {
"experimental": {
"classRegex": ["\"([^\"]*)\""]
}
}
}
}
}
```
This works with plain string literals and with [Lustre](https://github.com/lustre-labs/lustre) view templates where class names are passed as string arguments.
See also:
- [Elixir](./elixir.md)

View file

@ -14,7 +14,7 @@ Languages which can be used with Tailwind CSS in Zed:
- [Astro](./astro.md#using-the-tailwind-css-language-server-with-astro)
- [CSS](./css.md)
- [ERB](./ruby.md#using-the-tailwind-css-language-server-with-ruby)
- [Gleam](./gleam.md)
- [Gleam](./gleam.md#using-the-tailwind-css-language-server-with-gleam)
- [HEEx](./elixir.md#using-the-tailwind-css-language-server-with-heex-templates)
- [HTML](./html.md#using-the-tailwind-css-language-server-with-html)
- [TypeScript](./typescript.md#using-the-tailwind-css-language-server-with-typescript)