Skip to content

Commit

Permalink
Preventing Autocompletion in PHP context
Browse files Browse the repository at this point in the history
  • Loading branch information
EmranMR committed Feb 2, 2022
1 parent 99b3292 commit a1aadf5
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Scripts/completion_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ exports.CompletionProvider = class CompletionProvider {
// console.log(context.selectors[1].string)
// console.log(context.selectors[2].string)
// console.log(context.selectors[0].matches('html'))


//Prevent completion in php context
if (
context.selectors[0].string === 'php.string.single-quoted.delimiter' ||
'php.string.double-quoted.delimiter'
) {
return true;
}

// Allow completions if context selectors is a HTML class attribute value.
if (context.selectors[0].matches('html.tag.attribute.class.value.double-quoted')) { return false }

Expand Down

0 comments on commit a1aadf5

Please sign in to comment.