Skip to content

Commit

Permalink
Merge pull request #67 from andremacola/master
Browse files Browse the repository at this point in the history
Adjust "disable_default_completions" setting
  • Loading branch information
braver committed Sep 4, 2020
2 parents 59417ae + 2ee1059 commit bc6332c
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions sass_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,15 +612,18 @@ class CSSCompletions(sublime_plugin.EventListener):

def on_query_completions(self, view, prefix, locations):

if sublime.load_settings('CSS.sublime-settings').get('disable_default_completions'):
pt = locations[0]
loc = locations[0]
is_scss = view.match_selector(loc, "source.scss")

if is_scss and sublime.load_settings('SCSS.sublime-settings').get('disable_default_completions'):
return None
elif sublime.load_settings('Sass.sublime-settings').get('disable_default_completions'):
return None

pt = locations[0]
if not match_selector(view, pt, self.selector_scope):
return None

loc = locations[0]
is_scss = view.match_selector(loc, "source.scss")
if not self.props:
self.props = parse_css_data()
self.re_value = re.compile(r"^(?:\s*(:)|([ \t]*))([^:]*)([;}])")
Expand Down

0 comments on commit bc6332c

Please sign in to comment.