Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update development setup in sdk-docs #3506

Merged
merged 3 commits into from
Feb 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions docs/sdk/src/reference_docs/development_environment_advice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,74 @@
//! If you have a powerful remote server available, you may consider using
//! [cargo-remote](https://github.com/sgeisler/cargo-remote) to execute cargo commands on it,
//! freeing up local resources for other tasks like `rust-analyzer`.
//!
//! When using `cargo-remote`, you can configure your editor to perform the the typical
//! "check-on-save" remotely as well. The configuration for VSCode is as follows:
//!
//! ```json
//! {
//! "rust-analyzer.cargo.buildScripts.overrideCommand": [
//! "cargo",
//! "remote",
//! "--build-env",
//! "SKIP_WASM_BUILD=1",
//! "--",
//! "check",
//! "--message-format=json",
//! "--all-targets",
//! "--all-features",
//! "--target-dir=target/rust-analyzer"
//! ],
//! "rust-analyzer.check.overrideCommand": [
//! "cargo",
//! "remote",
//! "--build-env",
//! "SKIP_WASM_BUILD=1",
//! "--",
//! "check",
//! "--workspace",
//! "--message-format=json",
//! "--all-targets",
//! "--all-features",
//! "--target-dir=target/rust-analyzer"
//! ],
//! }
//! ```
kianenigma marked this conversation as resolved.
Show resolved Hide resolved
//!
//! //! and the same in Lua for `neovim/nvim-lspconfig`:
//!
//! ```lua
//! ["rust-analyzer"] = {
//! cargo = {
//! buildScripts = {
//! overrideCommand = {
//! "cargo",
//! "remote",
//! "--build-env",
//! "SKIP_WASM_BUILD=1",
//! "--",
//! "check",
//! "--message-format=json",
//! "--all-targets",
//! "--all-features",
//! "--target-dir=target/rust-analyzer"
//! },
//! },
//! check = {
//! overrideCommand = {
//! "cargo",
//! "remote",
//! "--build-env",
//! "SKIP_WASM_BUILD=1",
//! "--",
//! "check",
//! "--workspace",
//! "--message-format=json",
//! "--all-targets",
//! "--all-features",
//! "--target-dir=target/rust-analyzer"
//! },
//! },
//! },
//! },
//! ```
Loading