use_vscode: Set up VS Code configuration for an rextendr project

View source: R/use_vscode.R

use_vscodeR Documentation

Set up VS Code configuration for an rextendr project

Description

This creates a .vscode folder (if needed) and populates it with a settings.json template. If already exists, it will be updated to include the rust-analyzer.linkedProjects setting.

Usage

use_vscode(quiet = FALSE, overwrite = FALSE)

use_positron(quiet = FALSE, overwrite = FALSE)

Arguments

quiet

If TRUE, suppress messages.

overwrite

If TRUE, overwrite existing files.

Details

Rust-Analyzer VSCode extension looks for a Cargo.toml file in the workspace root by default. This function creates a .vscode folder and populates it with a settings.json file that sets the workspace root to the src directory of the package. This allows you to open the package directory in VSCode and have the Rust-Analyzer extension work correctly.

Value

TRUE (invisibly) if the settings file was created or updated.


extendr/rextendr documentation built on July 17, 2025, 1:01 a.m.