volar-service-emmet 0.0.40 → 0.0.41-patch.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +3 -1
- package/index.js +2 -2
- package/package.json +2 -3
package/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { LanguageServicePlugin } from '@volar/language-service';
|
|
2
|
-
export declare function create(
|
|
2
|
+
export declare function create({ mappedModes, }: {
|
|
3
|
+
mappedModes?: Record<string, string>;
|
|
4
|
+
}): LanguageServicePlugin;
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -18,7 +18,7 @@ function getHtmlDocument(document) {
|
|
|
18
18
|
htmlDocuments.set(document, [document.version, doc]);
|
|
19
19
|
return doc;
|
|
20
20
|
}
|
|
21
|
-
function create() {
|
|
21
|
+
function create({ mappedModes = {}, }) {
|
|
22
22
|
return {
|
|
23
23
|
name: 'emmet',
|
|
24
24
|
// https://docs.emmet.io/abbreviations/syntax/
|
|
@@ -27,7 +27,7 @@ function create() {
|
|
|
27
27
|
return {
|
|
28
28
|
isAdditionalCompletion: true,
|
|
29
29
|
async provideCompletionItems(textDocument, position) {
|
|
30
|
-
const syntax = emmet.getEmmetMode(textDocument.languageId
|
|
30
|
+
const syntax = emmet.getEmmetMode(mappedModes[textDocument.languageId] ?? textDocument.languageId);
|
|
31
31
|
if (!syntax) {
|
|
32
32
|
return;
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "volar-service-emmet",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.41-patch.1",
|
|
4
4
|
"description": "Integrate @vscode/emmet-helper into Volar",
|
|
5
5
|
"homepage": "https://github.com/volarjs/services/tree/master/packages/emmet",
|
|
6
6
|
"bugs": "https://github.com/volarjs/services/issues",
|
|
@@ -37,6 +37,5 @@
|
|
|
37
37
|
},
|
|
38
38
|
"browser": {
|
|
39
39
|
"./index.js": "./empty.js"
|
|
40
|
-
}
|
|
41
|
-
"gitHead": "75c5472887e274929fa4c0c2a54f9e97e4fe30a0"
|
|
40
|
+
}
|
|
42
41
|
}
|