Skip to content
This repository was archived by the owner on May 25, 2019. It is now read-only.

Commit 5e2a621

Browse files
committed
Updates README on how to adjust for custom 'app' variable names
1 parent 3c46fc8 commit 5e2a621

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

‎README.md

+26-24
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ You can use the following properties to either extend or override the default co
9090

9191
**core_attribute_list**: [*]; Default list of filters
9292

93-
**AngularUI_attribute_list**: [*]; Default list of AngularUI directives
94-
9593
[*] - Adding any of these properties to your User file will override all default values for that setting
9694

9795
**Example** *Completions - User*
@@ -144,6 +142,32 @@ Indexing Options
144142

145143
Preferences > Package Settings > AngularJS > **Settings - User** *(requires project to be re-indexed)*
146144

145+
The regex that's used for look up expects the definitions to start like one of the the following examples:
146+
147+
```js
148+
filter('interpolate', ['version', function(version) { ...
149+
150+
.filter('interpolate', ['version', function(version) { ...
151+
152+
('chained').filter('interpolate', ['version', function(version) { ...
153+
154+
/**
155+
* If you use something other than `app` as a variable name
156+
* you will need to update the `match_expressions` setting
157+
* and change `app` to some other name.
158+
*/
159+
app.filter('interpolate', ['version', function(version) { ...
160+
161+
angular.module('myApp', [])
162+
```
163+
_you can change `app` to some other name if you need to_
164+
165+
**match_expression**: `"((^[ \\\\t]*\\.{0}|^[ \\\\t]*{0}|angular\\.{0}|\\)\\.{0}|app\\.{0})[ ]*\\([ ]*[\"\\'])([\\w\\.\\$]*)([\"\\'])"`
166+
167+
_if you want to match against a group of names change `app` to `(app|somethingElse|foo)` and bump the following setting to `4`_
168+
169+
**match_expression_group**: 3
170+
147171
**match_definitions**: ["controller", "directive", "module", "factory", "filter"]; Determines what type of definitions to index
148172
149173
**excluded_dirs**: ["node_modules/"]; Global setting for excluding folders
@@ -264,28 +288,6 @@ Quickly find your directives/filters/modules/factories via the quick_panel. Once
264288
265289
Each time you save a file that file will be reindexed, if you have already triggered indexing, so that the quick_panel search stays up-to-date.
266290
267-
The regex that's used for look up expects the definitions to start like one of the the following examples
268-
269-
```js
270-
filter('interpolate', ['version', function(version) {
271-
```
272-
273-
```js
274-
.filter('interpolate', ['version', function(version) {
275-
```
276-
277-
```js
278-
('chained').filter('interpolate', ['version', function(version) {
279-
```
280-
281-
```js
282-
app.filter('interpolate', ['version', function(version) {
283-
```
284-
285-
```js
286-
angular.module('myApp', [])
287-
```
288-
289291
Javascript Completions
290292
---
291293

0 commit comments

Comments
 (0)