This repository was archived by the owner on Sep 8, 2020. It is now read-only.
File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ module.exports =
11
11
completions : COMPLETIONS
12
12
13
13
getSuggestions : (request ) ->
14
- if @ isJavaScript (request)
14
+ if @ isJavaScript (request) and @ isIgnoreInJavaScript (request)
15
15
@ getJavascriptCompletions (request)
16
16
else if @ isHtml (request)
17
17
if @ isAttributeStart (request)
@@ -26,6 +26,17 @@ module.exports =
26
26
return true if scope .startsWith (' source' ) and scope .endsWith (' .js' )
27
27
return false
28
28
29
+ isIgnoreInJavaScript : ({ scopeDescriptor }) ->
30
+ scopes = scopeDescriptor .getScopesArray ()
31
+ return false if scopes .indexOf (' punctuation.terminator.statement.js' ) isnt - 1 or
32
+ scopes .indexOf (' keyword.operator.assignment.js' ) isnt - 1 or
33
+ scopes .indexOf (' meta.delimiter.object.comma.js' ) isnt - 1 or
34
+ scopes .indexOf (' keyword.operator.comparison.js' ) isnt - 1 or
35
+ scopes .indexOf (' keyword.operator.ternary.js' ) isnt - 1 or
36
+ scopes .indexOf (' keyword.operator.js' ) isnt - 1 or
37
+ scopes .indexOf (' string.quoted.template.js' ) isnt - 1
38
+ return true
39
+
29
40
isHtml : ({ scopeDescriptor }) ->
30
41
for scope in scopeDescriptor .getScopesArray ()
31
42
return true if scope .endsWith (' .html' )
You can’t perform that action at this time.
0 commit comments