Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Jul 19, 2023
1 parent 21c5994 commit 73ca407
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,6 @@ export async function activate(context: vscode.ExtensionContext) {
const activeTextEditorUri = vscode.window.activeTextEditor?.document?.uri?.path
let completions: vscode.CompletionItem[] = []
let unoCompletionsMap: any
if (currentFolder)
await updateUnoStatus(vscode.window.activeTextEditor?.document.uri.fsPath)
if (presets.length)
rules.unshift(...presets)
let isOpen = true
// 如果在class或者className中才处理成-[]
const statusBarItem = createBottomBar({
text: 'uno-magic off 😞',
command: {
Expand All @@ -361,9 +355,11 @@ export async function activate(context: vscode.ExtensionContext) {
position: 'left',
offset: 500,
})

if (hasUnoConfig)
statusBarItem.show()
if (currentFolder)
await updateUnoStatus(vscode.window.activeTextEditor?.document.uri.fsPath)
if (presets.length)
rules.unshift(...presets)
let isOpen = true

registerCommand('unomagic.changeStatus', () => {
isOpen = !isOpen
Expand Down Expand Up @@ -470,6 +466,7 @@ export async function activate(context: vscode.ExtensionContext) {
})
}
hasUnoConfig = filepath
statusBarItem.show()
})
}
// 如果是unocss环境下,给出一些预设提醒
Expand Down

0 comments on commit 73ca407

Please sign in to comment.