Skip to content

Commit

Permalink
refactor: Add format on save for VS Code
Browse files Browse the repository at this point in the history
Added settings to format various file types on save in VS Code.

Added some recommended VS Code extensions:

- Prettier for formatting various file types
- Python for formatting Python files
- C/C++ for formatting C files
- Devicetree for syntax highlighting
- CMake for syntax highlighting
  • Loading branch information
joelspadin authored and petejohanson committed May 14, 2023
1 parent 48be2ee commit d53cd19
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"ms-python.python",
"ms-vscode.cpptools",
"plorefice.devicetree",
"twxs.cmake"
]
}
18 changes: 17 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,21 @@
"*.overlay": "dts",
"*.keymap": "dts"
},
"python.formatting.provider": "black"
"python.formatting.provider": "black",
"[c]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-vscode.cpptools"
},
"[javascript][javascriptreact][typescript][typescriptreact]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.python"
},
"[css][json][jsonc][html][markdown][yaml]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

0 comments on commit d53cd19

Please sign in to comment.