Home

tailwind-ctp-intellisense @03e16a4ac0640fb8d5403dd15130d80c1940b3bc - 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
16
import { Connection } from 'vscode-languageserver'
import { LanguageClient } from 'vscode-languageclient'

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