Skip to content

Commit

Permalink
Added missing setting from autocomplete.
Browse files Browse the repository at this point in the history
Fixed reference to setting in script.
fixed incorrectly parsed autocomplete files.
  • Loading branch information
sigmantium committed Jun 26, 2019
1 parent 31605ad commit e94a9fe
Show file tree
Hide file tree
Showing 5 changed files with 465 additions and 461 deletions.
4 changes: 4 additions & 0 deletions Autocomplete.sublime-settings
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
// Setting: file_view_abbrev
// Default: \tview
// Purpose: When reciving an autocomplete from the currently open file the autocomplete type shown on the right hand side will display this string
"file_view_abbrev": "\tview",
// --------------------
// sublime-better-completions-Package (sbc package)
// --------------------
Expand Down
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def on_query_completions(self, view, prefix, locations):
view_words = v.extract_completions(prefix, locations[0])
else:
view_words = v.extract_completions(prefix)
view_words = filter_words(view_words)
#view_words = filter_words(view_words)
view_words = fix_truncation(v, view_words)
words += [(w, v) for w in view_words]

Expand All @@ -73,15 +73,15 @@ def on_query_completions(self, view, prefix, locations):
if scope and view.match_selector(locations[0], scope):
self.completions += pleasurazy.api[API_Keyword].get('completions')

"""REMOVED FOR MULTI FILE AUTOCOMPLETE

for w, v in words:
trigger = w
contents = w.replace('$', '\\$')
if v.id != view.id and v.file_name():
trigger += '\t(%s)' % basename(v.file_name())
if v.id == view.id:
trigger += settings.get("file_view_abbrev", '\tview')
#self.completions.append([trigger, contents])"""
trigger += settings.get('file_view_abbrev', '\tview')
self.completions.append([trigger, contents])

if not self.completions:
return []
Expand Down
Loading

0 comments on commit e94a9fe

Please sign in to comment.