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

Commit cd9525a

Browse files
committed
use module instead of local function to call jscompletion module
1 parent 5493524 commit cd9525a

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

‎AngularJS-sublime-package.py

+5-11
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,6 @@ def filter_completions(self):
302302
else:
303303
return []
304304

305-
def js_completions(self, word=None):
306-
return jscompletions.global_completions(word)
307-
308-
def js_in_string_completions(self, prefix):
309-
return jscompletions.in_string_completions(prefix)
310-
311305
def add_indexed_directives(self):
312306
if self.settings.get('disable_indexed_directive_completions'): return []
313307

@@ -388,16 +382,16 @@ def on_query_completions(self, view, prefix, locations):
388382
# Check if we're possibly at a scope var
389383
if 'scope' in word.lower():
390384
word = '$rootScope'
391-
return ng.js_completions(word)
385+
return jscompletions.global_completions(word)
392386
if(view.score_selector(_scope, 'source.js string.quoted')):
393387
if viewlocation.at_line_with_module(view, locations):
394-
return jscompletions.get('module', ng.get_current_project_indexes())
395-
return ng.js_in_string_completions(prefix)
388+
return jscompletions.get(('module'), ng.get_current_project_indexes())
389+
return jscompletions.in_string_completions(prefix, ng.get_current_project_indexes())
396390

397391
if(viewlocation.at_html_attribute(view, 'ng-controller', locations)):
398-
return jscompletions.get('controller', ng.get_current_project_indexes())
392+
return jscompletions.get(('controller'), ng.get_current_project_indexes())
399393
if(viewlocation.at_html_attribute(view, 'ng-app', locations)):
400-
return jscompletions.get('module', ng.get_current_project_indexes())
394+
return jscompletions.get(('module'), ng.get_current_project_indexes())
401395
if(view.score_selector(_scope, ng.settings.get('filter_scope'))):
402396
return ng.filter_completions()
403397
for selector in ng.settings.get('attribute_avoided_scopes'):

0 commit comments

Comments
 (0)