mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
Adding keepLines feature to the settings (#154790)
* Adding the keepLines feature into the settings so the user can format while keeping the original line positions in json documents * update service * update dependencies Co-authored-by: Martin Aeschlimann <martinae@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
c71e78d3d6
commit
47a1f80c65
@@ -57,6 +57,7 @@ type Settings = {
|
||||
json?: {
|
||||
schemas?: JSONSchemaSettings[];
|
||||
format?: { enable?: boolean };
|
||||
keepLines?: { enable?: boolean };
|
||||
validate?: { enable?: boolean };
|
||||
resultLimit?: number;
|
||||
};
|
||||
@@ -74,6 +75,7 @@ export type JSONSchemaSettings = {
|
||||
|
||||
export namespace SettingIds {
|
||||
export const enableFormatter = 'json.format.enable';
|
||||
export const enableKeepLines = 'json.format.keepLines';
|
||||
export const enableValidation = 'json.validate.enable';
|
||||
export const enableSchemaDownload = 'json.schemaDownload.enable';
|
||||
export const maxItemsComputed = 'json.maxItemsComputed';
|
||||
@@ -480,6 +482,7 @@ function getSettings(): Settings {
|
||||
json: {
|
||||
validate: { enable: configuration.get(SettingIds.enableValidation) },
|
||||
format: { enable: configuration.get(SettingIds.enableFormatter) },
|
||||
keepLines: { enable: configuration.get(SettingIds.enableKeepLines) },
|
||||
schemas: [],
|
||||
resultLimit: resultLimit + 1 // ask for one more so we can detect if the limit has been exceeded
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user