Skip to content

Commit

Permalink
fix: don't combine emmet completion with embedded languages completion
Browse files Browse the repository at this point in the history
close #1039
  • Loading branch information
johnsoncodehk committed Mar 20, 2022
1 parent cd182f6 commit 67d3bdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Expand Up @@ -151,7 +151,7 @@ export function register(context: LanguageServiceRuntimeContext) {

const embeddedCompletionList = await plugin.doComplete(sourceMap.mappedDocument, embeddedRange.start, completionContext);

if (!embeddedCompletionList)
if (!embeddedCompletionList || !embeddedCompletionList.items.length)
continue;

if (!plugin.context?.isAdditionalCompletion) {
Expand Down Expand Up @@ -212,7 +212,7 @@ export function register(context: LanguageServiceRuntimeContext) {

const completionList = await plugin.doComplete(document, position, completionContext);

if (!completionList)
if (!completionList || !completionList.items.length)
continue;

if (!plugin.context?.isAdditionalCompletion) {
Expand Down
3 changes: 0 additions & 3 deletions packages/vue-language-service/src/languageService.ts
Expand Up @@ -156,9 +156,6 @@ export function createLanguageService(
useEmmetPlugin({
configurationHost,
}),
{
isAdditionalCompletion: true,
},
);
const scriptTsPlugin = useTsPlugins(
scriptTsLs,
Expand Down

0 comments on commit 67d3bdf

Please sign in to comment.