diff --git a/src/emmetHelper.ts b/src/emmetHelper.ts index 57bb0e6..4d75bfd 100644 --- a/src/emmetHelper.ts +++ b/src/emmetHelper.ts @@ -174,9 +174,9 @@ export function doComplete(document: TextDocument, position: Position, syntax: s let tagToFindMoreSuggestionsFor = abbreviation; let newTagMatches = abbreviation.match(/(>|\+)([\w:-]+)$/); if (newTagMatches && newTagMatches.length === 3) { - tagToFindMoreSuggestionsFor = newTagMatches[2]; - } - + tagToFindMoreSuggestionsFor = newTagMatches[2]; + } + let commonlyUsedTagSuggestions = makeSnippetSuggestion(commonlyUsedTags, tagToFindMoreSuggestionsFor, abbreviation, abbreviationRange, expandOptions, 'Emmet Abbreviation'); completionItems = completionItems.concat(commonlyUsedTagSuggestions); @@ -767,9 +767,14 @@ function getFormatters(syntax: string, preferences: any) { comment: commentFormatter }; } - + let fuzzySearchMinScore = typeof preferences['css.fuzzySearchMinScore'] === 'number' ? preferences['css.fuzzySearchMinScore'] : 0.3; + if (fuzzySearchMinScore > 1) { + fuzzySearchMinScore = 1 + } else if (fuzzySearchMinScore < 0) { + fuzzySearchMinScore = 0 + } let stylesheetFormatter = { - 'fuzzySearchMinScore': 0.3 + 'fuzzySearchMinScore': fuzzySearchMinScore }; for (let key in preferences) { switch (key) {