mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
json.format.enable
This commit is contained in:
@@ -64,8 +64,7 @@ connection.onInitialize((params: InitializeParams): InitializeResult => {
|
||||
completionProvider: { resolveProvider: true, triggerCharacters: ['"', ':'] },
|
||||
hoverProvider: true,
|
||||
documentSymbolProvider: true,
|
||||
documentRangeFormattingProvider: true,
|
||||
documentFormattingProvider: true
|
||||
documentRangeFormattingProvider: params.initializationOptions['format.enable']
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -278,11 +277,6 @@ connection.onDocumentSymbol(documentSymbolParams => {
|
||||
return languageService.findDocumentSymbols(document, jsonDocument);
|
||||
});
|
||||
|
||||
connection.onDocumentFormatting(formatParams => {
|
||||
let document = documents.get(formatParams.textDocument.uri);
|
||||
return languageService.format(document, null, formatParams.options);
|
||||
});
|
||||
|
||||
connection.onDocumentRangeFormatting(formatParams => {
|
||||
let document = documents.get(formatParams.textDocument.uri);
|
||||
return languageService.format(document, formatParams.range, formatParams.options);
|
||||
|
||||
Reference in New Issue
Block a user