Home

tailwind-ctp-intellisense @5f6b8e3f4e3e5b05772156d73abdab8613b69c21 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / src / lsp / notifications.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import { Connection } from 'vscode-languageserver'

export function onMessage(
  connection: Connection,
  name: string,
  handler: (params: any) => any
): void {
  connection.onNotification(`tailwindcss/${name}`, async (params: any) => {
    const { _id, ...rest } = params
    connection.sendNotification(`tailwindcss/${name}Response`, {
      _id,
      ...(await handler(rest)),
    })
  })
}