master
Brad Cornes 2018-08-25 00:15:40 +01:00
parent 7f77a9ebfa
commit a8e6a9ac01
1 changed files with 9 additions and 2 deletions

View File

@ -52,6 +52,11 @@ export async function activate(context: vscode.ExtensionContext) {
return return
} }
if (!tw) {
intellisense.dispose()
return
}
intellisense.reload(tw) intellisense.reload(tw)
} }
} }
@ -132,9 +137,11 @@ function createCompletionItemProvider(
// e.g. .flex.items-center // e.g. .flex.items-center
let lineText = text.split('\n').pop() let lineText = text.split('\n').pop()
matches = lineText.match(/\.([^()#>*^ \[\]=$@{}]*)$/i) matches = lineText.match(/\.([^()#>*^ \[\]=$@{}]*)$/i)
if (matches) {
let parts = matches[matches.length - 1].split('.') let parts = matches[matches.length - 1].split('.')
str = parts[parts.length - 1] str = parts[parts.length - 1]
} }
}
if (typeof str !== 'undefined') { if (typeof str !== 'undefined') {
const pth = str const pth = str