Add TailwindCSS LSP server support #5887

Open
opened 2026-02-16 17:58:00 -05:00 by yindo · 0 comments
Owner

Originally created by @iljod on GitHub (Jan 14, 2026).

Originally assigned to: @thdxr on GitHub.

Feature Request

I would like support for the TailwindCSS Language Server in OpenCode.

Why

TailwindCSS is one of the most popular CSS frameworks, and having LSP support would provide:

  • Autocomplete for TailwindCSS classes
  • Hover information showing documentation
  • Real-time diagnostics and linting
  • Better editor experience for TailwindCSS projects

Expected Behavior

OpenCode should automatically detect TailwindCSS projects (by looking for tailwind.config.js, tailwind.config.ts, postcss.config.js, or postcss.config.ts) and spawn the @tailwindcss/language-server for relevant files.

Files to Support

  • .css, .html, .htm, .jsx, .tsx, .vue, .svelte

Implementation Suggestion

Follow the existing pattern used by other auto-installed language servers (Vue, Svelte, etc.) in the codebase:

  • Check for tailwindcss-language-server binary
  • If not found, auto-install @tailwindcss/language-server via Bun
  • Spawn the server with --stdio flag
Originally created by @iljod on GitHub (Jan 14, 2026). Originally assigned to: @thdxr on GitHub. ## Feature Request I would like support for the TailwindCSS Language Server in OpenCode. ## Why TailwindCSS is one of the most popular CSS frameworks, and having LSP support would provide: - Autocomplete for TailwindCSS classes - Hover information showing documentation - Real-time diagnostics and linting - Better editor experience for TailwindCSS projects ## Expected Behavior OpenCode should automatically detect TailwindCSS projects (by looking for `tailwind.config.js`, `tailwind.config.ts`, `postcss.config.js`, or `postcss.config.ts`) and spawn the `@tailwindcss/language-server` for relevant files. ## Files to Support - `.css`, `.html`, `.htm`, `.jsx`, `.tsx`, `.vue`, `.svelte` ## Implementation Suggestion Follow the existing pattern used by other auto-installed language servers (Vue, Svelte, etc.) in the codebase: - Check for `tailwindcss-language-server` binary - If not found, auto-install `@tailwindcss/language-server` via Bun - Spawn the server with `--stdio` flag
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5887