Support `InitializeParams.rootUri` (#725)

* Support `InitializeParams.rootUri`

* Remove log
master
Brad Cornes 2023-03-10 11:09:36 +00:00 committed by GitHub
parent 3aafffefda
commit ce897c9b12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -1607,17 +1607,25 @@ class TW {
this.initialized = true
if (!this.initializeParams.rootPath) {
let base: string
if (this.initializeParams.rootUri) {
base = URI.parse(this.initializeParams.rootUri).fsPath
} else if (this.initializeParams.rootPath) {
base = normalizeFileNameToFsPath(this.initializeParams.rootPath)
}
if (!base) {
console.error('No workspace folders found, not initializing.')
return
}
base = normalizePath(base)
let workspaceFolders: Array<ProjectConfig> = []
let globalSettings = await getConfiguration()
let ignore = globalSettings.tailwindCSS.files.exclude
let configFileOrFiles = globalSettings.tailwindCSS.experimental.configFile
let base = normalizePath(normalizeFileNameToFsPath(this.initializeParams.rootPath))
let cssFileConfigMap: Map<string, string> = new Map()
let configTailwindVersionMap: Map<string, string> = new Map()