Home

tailwind-ctp-intellisense @32dca9259be91a8fd6c1379c975af61edb3376e5 - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tailwind-ctp-intellisense / packages / tailwindcss-language-server / src / util / getDocumentSettings.ts
- raw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
import { State, Settings } from './state'

export async function getDocumentSettings(
  state: State,
  resource: string
): Promise<Settings> {
  if (!state.editor.capabilities.configuration) {
    return Promise.resolve(state.editor.globalSettings)
  }
  let result = state.editor.documentSettings.get(resource)
  if (!result) {
    result = await state.editor.connection.workspace.getConfiguration({
      scopeUri: resource,
      section: 'tailwindCSS',
    })
    state.editor.documentSettings.set(resource, result)
  }
  return result
}