From 5b95942b4d390c0f9104c4a07b6ae6ce694ee7a1 Mon Sep 17 00:00:00 2001 From: Winston Liu <50Wliu@users.noreply.github.com> Date: Tue, 18 Jun 2019 22:04:48 -0400 Subject: [PATCH 1/4] Add settings for formatting --- package.json | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/package.json b/package.json index ca9163a..732be0f 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,63 @@ } } }, + "format": { + "type": "object", + "title": "Format", + "properties": { + "enabled": { + "order": 1, + "type": "boolean", + "title": "Enabled", + "default": true, + "description": "Controls whether formatting is enabled." + }, + "comments": { + "type": "object", + "title": "Comments", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": true, + "description": "Include comments when formatting." + } + } + }, + "onType": { + "type": "object", + "title": "On Type", + "properties": { + "enabled": { + "type": "boolean", + "title": "Enabled", + "default": true, + "description": "Format code as you type." + } + } + }, + "settings": { + "type": "object", + "title": "Settings", + "properties": { + "url": { + "order": 1, + "type": "string", + "title": "URL", + "default": "", + "description": "URL to an XML file specifying format options." + }, + "profile": { + "order": 2, + "type": "string", + "title": "Profile Name", + "default": "", + "description": "Name of the formatter profile to use. Has no effect unless a formatter URL is specified." + } + } + } + } + }, "signatureHelp": { "type": "object", "title": "Signature Help", From c1430986c12b0447bccf93987322c112f19093b3 Mon Sep 17 00:00:00 2001 From: Winston Liu <50Wliu@users.noreply.github.com> Date: Tue, 18 Jun 2019 22:05:04 -0400 Subject: [PATCH 2/4] Add ability to format on type --- package.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 732be0f..417f450 100644 --- a/package.json +++ b/package.json @@ -205,7 +205,17 @@ }, "code-format.range": { "versions": { - "0.1.0": "provideCodeFormat" + "0.1.0": "provideRangeCodeFormat" + } + }, + "code-format.file": { + "versions": { + "0.1.0": "provideFileCodeFormat" + } + }, + "code-format.onType": { + "versions": { + "0.1.0": "provideOnTypeCodeFormat" } }, "code-highlight": { From 4467979be88905b674898c09cef93bdd72306dd3 Mon Sep 17 00:00:00 2001 From: Winston Liu <50Wliu@users.noreply.github.com> Date: Tue, 18 Jun 2019 22:07:32 -0400 Subject: [PATCH 3/4] Add ability to format on save --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 417f450..1e89117 100644 --- a/package.json +++ b/package.json @@ -218,6 +218,11 @@ "0.1.0": "provideOnTypeCodeFormat" } }, + "code-format.onSave": { + "versions": { + "0.1.0": "provideOnSaveCodeFormat" + } + }, "code-highlight": { "versions": { "0.1.0": "provideCodeHighlight" From 74a5645b6b39e2c2336486eda24bc6e53ba75add Mon Sep 17 00:00:00 2001 From: Winston Liu <50Wliu@users.noreply.github.com> Date: Wed, 19 Jun 2019 11:13:54 -0400 Subject: [PATCH 4/4] :arrow_up: atom-languageclient@0.9.9 For new formatting options --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1e89117..fdfccad 100644 --- a/package.json +++ b/package.json @@ -150,7 +150,7 @@ }, "atomTestRunner": "./test/runner", "dependencies": { - "atom-languageclient": "0.9.5", + "atom-languageclient": "^0.9.9", "atom-select-list": "^0.7.1", "decompress": "^4.2.0" },