提交 39c835a5 编写于 作者: M Martin Aeschlimann

fixes #5981: [json] accept empty keybindings.json file

上级 224bbb8b
......@@ -210,6 +210,12 @@ function updateConfiguration() {
function validateTextDocument(textDocument: ITextDocument): void {
if (textDocument.getText().length === 0) {
// ignore empty documents
connection.sendDiagnostics({ uri: textDocument.uri, diagnostics: [] });
return;
}
let jsonDocument = getJSONDocument(textDocument);
jsonSchemaService.getSchemaForResource(textDocument.uri, jsonDocument).then(schema => {
if (schema) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册