vscode-html-languageservice
Advanced tools
Comparing version 3.0.4-next.2 to 3.0.4-next.3
@@ -10,6 +10,6 @@ # Custom Data for HTML Language Service | ||
You can read more about custom data at: https://github.com/microsoft/vscode-custom-data. | ||
## Custom Data Format | ||
🚧 The data format is in experimental phase and subject to change. 🚧 | ||
The JSON have one required property, `version` and 3 other top level properties: | ||
@@ -26,19 +26,8 @@ | ||
Version denotes the schema version you are using. The latest schema version is V1. | ||
Version denotes the schema version you are using. The latest schema version is `V1.1`. | ||
You can find other properties' shapes at [htmlLanguageTypes.ts](../src/htmlLanguageTypes.ts) or the [JSON Schema](./customData.schema.json). | ||
You might want to use the `json.schemas` setting to check your data against the schema and get auto-completion: | ||
You should suffix your custom data file with `.html-data.json`, so VS Code will load the most recent schema for the JSON file to offer auto completion and error checking. | ||
```json | ||
{ | ||
"json.schemas": [ | ||
{ | ||
"fileMatch": ["/html.json"], | ||
"url": "https://raw.githubusercontent.com/Microsoft/vscode-html-languageservice/master/docs/customData.schema.json" | ||
} | ||
] | ||
} | ||
``` | ||
[html5.ts](../src/languageFacts/data/html5.ts) contains that built-in dataset that conforms to the spec. | ||
@@ -45,0 +34,0 @@ |
@@ -95,3 +95,3 @@ /*--------------------------------------------------------------------------------------------- | ||
kind: CompletionItemKind.Property, | ||
filterText: '/' + tag + closeTag, | ||
filterText: '/' + tag, | ||
textEdit: TextEdit.replace(range, '/' + tag + closeTag), | ||
@@ -105,3 +105,3 @@ insertTextFormat: InsertTextFormat.PlainText | ||
item.textEdit = TextEdit.replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText); | ||
item.filterText = endIndent + '</' + tag + closeTag; | ||
item.filterText = endIndent + '</' + tag; | ||
} | ||
@@ -108,0 +108,0 @@ result.items.push(item); |
@@ -106,3 +106,3 @@ /*--------------------------------------------------------------------------------------------- | ||
kind: vscode_languageserver_types_1.CompletionItemKind.Property, | ||
filterText: '/' + tag + closeTag, | ||
filterText: '/' + tag, | ||
textEdit: vscode_languageserver_types_1.TextEdit.replace(range, '/' + tag + closeTag), | ||
@@ -116,3 +116,3 @@ insertTextFormat: vscode_languageserver_types_1.InsertTextFormat.PlainText | ||
item.textEdit = vscode_languageserver_types_1.TextEdit.replace(getReplaceRange(afterOpenBracket - 1 - endIndent.length), insertText); | ||
item.filterText = endIndent + '</' + tag + closeTag; | ||
item.filterText = endIndent + '</' + tag; | ||
} | ||
@@ -119,0 +119,0 @@ result.items.push(item); |
{ | ||
"name": "vscode-html-languageservice", | ||
"version": "3.0.4-next.2", | ||
"version": "3.0.4-next.3", | ||
"description": "Language service for HTML", | ||
@@ -5,0 +5,0 @@ "main": "./lib/umd/htmlLanguageService.js", |
1709381