Skip to content

Commit

Permalink
[vscode] Update workspace file to better respect local style
Browse files Browse the repository at this point in the history
This change updates lk.code-workspace to specify
* editor.detectIndentation as false, as otherwise that overrides
  the desired editor.tabSize setting.
* editor.insertSpaces as true, since spaces are preferred over tabs.
* editor.formatOnSave as false for C and C++ files, as - in the absence
  of a .clang-format file - the clangd extension is likely to default to
  choices that don't respect the local style.
  • Loading branch information
joshuaseaton committed Aug 8, 2024
1 parent 87b7245 commit ef73e91
Showing 1 changed file with 33 additions and 20 deletions.
53 changes: 33 additions & 20 deletions lk.code-workspace
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"editor.tabSize": 4,
"files.exclude": {
"**/.cache": true,
"**/.clangd": true
}
},
"extensions": {
"recommendations": [
"mkornelsen.vscode-arm64",
"llvm-vs-code-extensions.vscode-clangd",
"sunshaoce.risc-v"
]
}
}
"folders": [
{
"path": "."
}
],
"settings": {
// Disable auto-formatting till the project decides on a
// machine-readable config to control it (e.g., .clang-format).
"[c]": {
"editor.formatOnSave": false,
},
"[cpp]": {
"editor.formatOnSave": false,
},
// Allows editor.tabSize to be specified (otherwise it is overridden as
// auto-detected).
"editor.detectIndentation": false,
// Convert tabs to spaces.
"editor.insertSpaces": true,
"editor.tabSize": 4,
"files.exclude": {
"**/.cache": true,
"**/.clangd": true
}
},
"extensions": {
"recommendations": [
"mkornelsen.vscode-arm64",
"llvm-vs-code-extensions.vscode-clangd",
"sunshaoce.risc-v"
]
}
}

0 comments on commit ef73e91

Please sign in to comment.