Skip to content

Commit

Permalink
[vscode] Split platform-specific paths; add mac
Browse files Browse the repository at this point in the history
Allows prebuilts to be used on mac-arm64. I know build on macOS is
officially unsupported; this improves the experience on macOS without
degrading the experience on Linux.

Change-Id: I1d36e3ec096132388206cdce67235c45005f8255
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1186285
Reviewed-by: Oliver Newman <[email protected]>
Commit-Queue: Jay Zhuang <[email protected]>
Reviewed-by: Jay Zhuang <[email protected]>
  • Loading branch information
tamird authored and CQ Bot committed Jan 14, 2025
1 parent 95c801a commit e91288a
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions fuchsia.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@
// Dart
//

"dart.sdkPath": "${workspaceFolder}/prebuilt/third_party/dart/linux-x64",
"[linux].dart.sdkPath": "${workspaceFolder}/prebuilt/third_party/dart/linux-x64",
"[mac].dart.sdkPath": "${workspaceFolder}/prebuilt/third_party/dart/mac-arm64",

////////
// Rust
Expand All @@ -148,10 +149,14 @@
"rust-analyzer.server.path": "${workspaceFolder}/prebuilt/third_party/rust-analyzer/rust-analyzer",

// Use Fuchsia's config and vendored rustfmt.
"rust-analyzer.rustfmt.overrideCommand": [
"[linux].rust-analyzer.rustfmt.overrideCommand": [
"${workspaceFolder}/prebuilt/third_party/rust/linux-x64/bin/rustfmt",
"--config-path=${workspaceFolder}/rustfmt.toml"
],
"[mac].rust-analyzer.rustfmt.overrideCommand": [
"${workspaceFolder}/prebuilt/third_party/rust/mac-arm64/bin/rustfmt",
"--config-path=${workspaceFolder}/rustfmt.toml"
],

// Use clippy.
"rust-analyzer.check.overrideCommand": [
Expand All @@ -176,7 +181,8 @@
"--background-index",
"--header-insertion=never"
],
"clangd.path": "${workspaceFolder}/prebuilt/third_party/clang/linux-x64/bin/clangd",
"[linux].clangd.path": "${workspaceFolder}/prebuilt/third_party/clang/linux-x64/bin/clangd",
"[mac].clangd.path": "${workspaceFolder}/prebuilt/third_party/clang/mac-arm64/bin/clangd",

// Formats C/C++ include guards to match Fuchsia style.
"C/C++ Include Guard.Comment Style": "Line",
Expand All @@ -187,7 +193,8 @@
////////
// Go

"go.goroot": "${workspaceFolder}/prebuilt/third_party/go/linux-x64",
"[linux].go.goroot": "${workspaceFolder}/prebuilt/third_party/go/linux-x64",
"[mac].go.goroot": "${workspaceFolder}/prebuilt/third_party/go/mac-arm64",

"gopls": {
// Restrict directories that gopls will search in, otherwise it can fail
Expand Down

0 comments on commit e91288a

Please sign in to comment.