Skip to content

fix(lsp): correct workspace and document color capabilities and add tailwind lsp - #2736

Open
bajrangCoder wants to merge 2 commits into
mainfrom
feat/tailwindcss-lsp
Open

fix(lsp): correct workspace and document color capabilities and add tailwind lsp#2736
bajrangCoder wants to merge 2 commits into
mainfrom
feat/tailwindcss-lsp

Conversation

@bajrangCoder

Copy link
Copy Markdown
Member

No description provided.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 14, 2026
@bajrangCoder bajrangCoder changed the title fix(lsp): correct workspace and document color capabilities fix(lsp): correct workspace and document color capabilities and add tailwind lsp Aug 14, 2026
@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR corrects LSP workspace-root and document-color capability handling and adds an optional built-in Tailwind CSS server.

  • Seeds the initial workspace folder to avoid duplicate change notifications.
  • Adds Tailwind registration, language aliases, and standard JS/TS language-ID resolution.
  • Advertises watched-file dynamic registration to Tailwind, although the corresponding registration and notification behavior is not implemented.

Confidence Score: 4/5

The watched-file capability should be removed or fully implemented before merging because enabled Tailwind servers can retain stale project state after watched files change.

Tailwind now negotiates dynamic watched-file registration, but Acode silently discards the resulting registrations and has no path that sends workspace/didChangeWatchedFiles notifications.

Files Needing Attention: src/cm/lsp/clientManager.ts and src/cm/lsp/transport.ts

Important Files Changed

Filename Overview
src/cm/lsp/clientManager.ts Corrects runtime-root initialization and adds Tailwind capabilities, but advertises watched-file registration that the client does not implement.
src/cm/lsp/transport.ts Existing transport behavior acknowledges dynamic capability registrations without applying them, making the newly advertised Tailwind capability ineffective.
src/cm/lsp/workspace.ts Seeds folders advertised during initialization so subsequent additions do not send duplicate notifications.
src/cm/lsp/serverRegistry.ts Adds Tailwind language aliases and a default JS/TS language-ID resolver during server sanitization.
src/cm/lsp/servers/tailwind.ts Defines a disabled-by-default Tailwind server with Alpine runtime and npm installation metadata.
src/cm/lsp/documentColors.ts Stops claiming support for dynamic document-color registration, consistent with the client's static-capability-driven implementation.

Sequence Diagram

sequenceDiagram
  participant Client as Acode LSP client
  participant Server as Tailwind server
  participant Files as Project files
  Client->>Server: initialize(dynamicRegistration: true)
  Server->>Client: client/registerCapability(watched files)
  Client-->>Server: null result
  Note over Client: Registration is not retained
  Files-->>Client: Matching file changes
  Note over Client,Server: No workspace/didChangeWatchedFiles notification
Loading

Reviews (1): Last reviewed commit: "feat(lsp): add Tailwind CSS server" | Re-trigger Greptile

Comment on lines +808 to +809
didChangeWatchedFiles: {
dynamicRegistration: true,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Watched-file registration is discarded

When an enabled Tailwind server dynamically registers workspace/didChangeWatchedFiles, the transport acknowledges but discards the registration and the client never emits matching notifications, causing Tailwind completions and diagnostics to remain stale after watched project files change.

Knowledge Base Used: LSP Integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant