angular-ui / AngularJS-sublime-package

AngularJS code completion, snippets, go to definition, quick panel search, and more.
MIT License
1.42k stars 169 forks source link

Autocompletion triggers on all semi-colons in the php scope #92

Open alextegelid opened 8 years ago

alextegelid commented 8 years ago

The AngularJS package is presenting some rather out-of-context completions for me. This screenshot was taken in a php file (scope: source.php) and the autocompletions suggestions appeared right efter I typed the semi-colon.

This behavior gets kind of in the way of writing multiple lines of php code since instead of getting a new line I get a snippet of an angular attribute.

image

edbentinck commented 8 years ago

I just came across the same issue. You should be able to solve it by customising the settings under Preferences -> Package Settings -> AngularJS -> Settings – User as follows:

{
    "attribute_avoided_scopes": [
        "source.php"
    ]
}

You can find all customisable properties in Preferences -> Package Settings -> AngularJS -> Settings – Default.

alextegelid commented 8 years ago

Thank you @edbentinck, that's a nice workaround. I'll definitely check out the other settings as well. Customization is the best 😎