volar-service-emmet
Advanced tools
Comparing version 0.0.41 to 0.0.42
import type { LanguageServicePlugin } from '@volar/language-service'; | ||
export declare function create(): LanguageServicePlugin; | ||
export declare function create({ mappedModes, }: { | ||
mappedModes?: Record<string, string>; | ||
}): LanguageServicePlugin; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -21,3 +21,3 @@ "use strict"; | ||
} | ||
function create() { | ||
function create({ mappedModes = {}, }) { | ||
return { | ||
@@ -31,3 +31,3 @@ name: 'emmet', | ||
async provideCompletionItems(textDocument, position) { | ||
const syntax = emmet.getEmmetMode(textDocument.languageId === 'vue' ? 'html' : textDocument.languageId); | ||
const syntax = emmet.getEmmetMode(mappedModes[textDocument.languageId] ?? textDocument.languageId); | ||
if (!syntax) { | ||
@@ -34,0 +34,0 @@ return; |
{ | ||
"name": "volar-service-emmet", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "Integrate @vscode/emmet-helper into Volar", | ||
@@ -31,3 +31,3 @@ "homepage": "https://github.com/volarjs/services/tree/master/packages/emmet", | ||
"peerDependencies": { | ||
"@volar/language-service": "~2.2.0-alpha.4" | ||
"@volar/language-service": "~2.2.0" | ||
}, | ||
@@ -42,3 +42,3 @@ "peerDependenciesMeta": { | ||
}, | ||
"gitHead": "431484e404a9696a8e4dbae5db8588d9828f78ac" | ||
"gitHead": "9649e1cc18d7720391567699af9e73f80f076565" | ||
} |
7395
105