Skip to content

Commit cf60738

Browse files
committed
fix vscode config for formatting markdown files now that we use two formatters for them
1 parent 29e303a commit cf60738

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"tamasfe.even-better-toml",
1010
"redhat.vscode-yaml",
1111
"github.vscode-github-actions",
12-
"Orta.vscode-jest"
12+
"Orta.vscode-jest",
13+
"jota0222.multi-formatter"
1314
]
1415
}

.vscode/settings.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"editor.codeActionsOnSave": {
1010
"source.fixAll.eslint": "always",
1111
"source.organizeImports": "always"
12-
},
12+
}
1313
},
1414
"[yaml]": {
1515
"editor.defaultFormatter": "esbenp.prettier-vscode",
@@ -19,12 +19,18 @@
1919
"editor.defaultFormatter": "tamasfe.even-better-toml",
2020
"editor.formatOnSave": true
2121
},
22-
"[python][markdown]": {
22+
"[python]": {
2323
"editor.defaultFormatter": "charliermarsh.ruff",
2424
"editor.codeActionsOnSave": {
2525
"source.organizeImports": "always"
2626
}
2727
},
28+
"[markdown]": {
29+
"editor.defaultFormatter": "Jota0222.multi-formatter",
30+
// need prettier to format markdown and ruff to format python codeblocks inside the markdown files
31+
"multiFormatter.formatterList": ["esbenp.prettier-vscode", "charliermarsh.ruff"],
32+
"editor.formatOnSave": true
33+
},
2834
"editor.codeActionsOnSave": {
2935
// this is the default, but we disable it explicitly to prevent any user settings from causing imports to get
3036
// sorted in typescript files since upstream has unsorted imports and we don't want to have to deal with
@@ -72,7 +78,7 @@
7278
"**/pyright-internal/src/tests/samples/*",
7379
"**/pyright-internal/typeshed-fallback/*",
7480
"**/docstubs/*",
75-
"**/build/py_latest/upstream/*",
81+
"**/build/py_latest/upstream/*"
7682
],
7783
// even though python.terminal.activateEnvInCurrentTerminal is enabled, we still need to add the venv's script folder to the PATH
7884
// because vscode's npm tasks do not run with the activated venv

0 commit comments

Comments
 (0)