Skip to content

Commit

Permalink
pull in completion fixes from CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed May 3, 2018
1 parent ca4e935 commit 7fd6376
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions less_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
'grid': [],
'grid-area': [],
'grid-auto-columns': ['auto', '<percentage>', '<length>'],
'grid-auto-flow': ['row', 'column' 'dense'],
'grid-auto-flow': ['row', 'column', 'dense'],
'grid-auto-rows': ['auto', '<percentage>', '<length>'],
'grid-column-gap': ['<length>', '<percentage>'],
'grid-gap': ['<length>', '<percentage>'],
Expand Down Expand Up @@ -487,13 +487,13 @@ def on_query_completions(self, view, prefix, locations):
add_semi_colon = view.substr(sublime.Region(loc, loc + 1)) != ';'

for value in values:
desc = value
desc = value + "\t" + prop_name
snippet = value

if add_semi_colon:
snippet += ";"

if snippet.find("$1") != -1:
if "$1" in snippet:
desc = desc.replace("$1", "")

l.append((desc, snippet))
Expand All @@ -506,8 +506,8 @@ def on_query_completions(self, view, prefix, locations):

for prop in self.props:
if add_colon:
l.append((prop, prop + ": "))
l.append((prop + "\tproperty", prop + ": "))
else:
l.append((prop, prop))
l.append((prop + "\tproperty", prop))

return (l, sublime.INHIBIT_WORD_COMPLETIONS)

0 comments on commit 7fd6376

Please sign in to comment.