fix shouldTrigger check
This commit is contained in:
parent
f574fc35bd
commit
ea84909a86
1 changed files with 11 additions and 13 deletions
|
@ -310,11 +310,8 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
|||
pre: string,
|
||||
option: any
|
||||
): boolean {
|
||||
if (triggerCharacter === '.') {
|
||||
if (pre.match(/[\s\.'"]\.$/)) {
|
||||
return false
|
||||
}
|
||||
} else if (triggerCharacter === '@') {
|
||||
if (triggerCharacter && this.client.apiVersion.lt(API.v290)) {
|
||||
if (triggerCharacter === '@') {
|
||||
// trigger in string
|
||||
if (option.synname && /string/i.test(option.synname)) {
|
||||
return true
|
||||
|
@ -326,6 +323,7 @@ export default class TypeScriptCompletionItemProvider implements CompletionItemP
|
|||
} else if (triggerCharacter === '<') {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue