[PR #9303] feat(lsp): Add TailwindCSS LSP server support #13063

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

Original Pull Request: https://github.com/anomalyco/opencode/pull/9303

State: open
Merged: No


Summary

This PR adds TailwindCSS Language Server support to OpenCode, enabling IDE-like features (autocomplete, hover info, diagnostics) for TailwindCSS projects.

Changes

  • Added Tailwind LSP server configuration in packages/opencode/src/lsp/server.ts
  • Auto-installs @tailwindcss/language-server when not found in system
  • Supports .css, .html, .jsx, .tsx, .vue, .astro, .svelte, .scss, .less files
  • Detects TailwindCSS projects via tailwind.config.* or postcss.config.* files
  • Updated LSP documentation in packages/web/src/content/docs/lsp.mdx

Testing

Tested locally with:

  • Opening supported files in Tailwind projects
  • Verified LSP server spawns automatically
  • Checked diagnostics for invalid Tailwind classes
  • Tested auto-detection of config files

Fixes #8518

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9303 **State:** open **Merged:** No --- ## Summary This PR adds TailwindCSS Language Server support to OpenCode, enabling IDE-like features (autocomplete, hover info, diagnostics) for TailwindCSS projects. ## Changes - Added `Tailwind` LSP server configuration in `packages/opencode/src/lsp/server.ts` - Auto-installs `@tailwindcss/language-server` when not found in system - Supports `.css`, `.html`, `.jsx`, `.tsx`, `.vue`, `.astro`, `.svelte`, `.scss`, `.less` files - Detects TailwindCSS projects via `tailwind.config.*` or `postcss.config.*` files - Updated LSP documentation in `packages/web/src/content/docs/lsp.mdx` ## Testing Tested locally with: - Opening supported files in Tailwind projects - Verified LSP server spawns automatically - Checked diagnostics for invalid Tailwind classes - Tested auto-detection of config files Fixes #8518
yindo added the pull-request label 2026-02-16 18:17:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13063