From b5765bc8cd7f60b506a909d3e21bbfa63ef226d8 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 15 Jul 2022 09:00:10 +0200 Subject: [PATCH] Illustrate `format_on_save` external command using prettier This gives us a chance to highlight a real-world scenario that a lot of our users will want to use, as well as showcasing the special `{buffer_path}` argument. --- assets/settings/default.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/settings/default.json b/assets/settings/default.json index 414f83982e..855854bd36 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -42,10 +42,10 @@ // 3. Format code using an external command: // "format_on_save": { // "external": { - // "command": "sed", - // "arguments": ["-e", "s/ *$//"] + // "command": "prettier", + // "arguments": ["--stdin-filepath", "{buffer_path}"] // } - // }, + // } "format_on_save": "language_server", // How to soft-wrap long lines of text. This setting can take // three values: