Skip to content

Commit 1a66a0e

Browse files
New doc for formatting philosophy
1 parent 5bf4a25 commit 1a66a0e

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

extension/docs/.vitepress/sidebars/code-comments.sidebar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const CODE_COMMENTS_SIDEBAR: SidebarEntry[] = [
3838
},
3939
{
4040
text: 'Formatting',
41+
link: '/code-comments/formatting',
4142
items: FORMATTING_SIDEBAR,
4243
},
4344
];
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Formatting
2+
3+
::: info
4+
5+
For those new to formatting their IDL code, we have several resources for you to learn how the different options work.
6+
7+
See [Configuration](/code-comments/formatting/configuration.md) and [Setup](/code-comments/formatting/setup.md) for more information.
8+
9+
:::
10+
11+
## Background and Design
12+
13+
The goal of adding in formatting to our VSCode extension was to get to a place where developers have automated tooling to help them, and others, write consistent code.
14+
15+
While we have some options to help fine-tune the visual appearance (i.e. "style" of your code), the spacing and more mechanical display is going to be the same for every user.
16+
17+
As-is, we have some options that provide a balance with legacy controls you had in the IDL Workbench, but we likely won't add any more controls unless there are new language-level features that get added.
18+
19+
If you want to learn more about the spirit of our decision, check out the [design philosophy of Prettier](https://prettier.io/docs/en/option-philosophy), which we modeled the IDL formatting after.

0 commit comments

Comments
 (0)