Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ book:
- chapters/where_to_get_help.qmd
- chapters/news_and_announcements.qmd
- chapters/developer_tools.qmd
- chapters/ide_setup.qmd
- chapters/additional_resources.qmd
- chapters/r_core_developers.qmd

Expand Down
84 changes: 84 additions & 0 deletions chapters/ide_setup.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# IDE Setup {sec-ide-setup}

**Note:**

Mention of these IDEs is not meant as a recommendation for either of them, just an acknowledgement that they're common choices.

## For VSCode

If you already have an `EditorConfig` set-up, merge the settings below into it. Otherwise, create it with the settings below.

```
{
// Editor settings for C files
// Cannot set to auto replace 8 spaces with tab (https://github.com/Microsoft/vscode/issues/ #42740, #5394)
"[c]": {
// An indent is 4 spaces
"editor.indentSize": 4,
// But display 8 spaces as a single tab
"editor.tabSize": 8,
// Need this to get indent size 4, else uses tabs to indent
"editor.insertSpaces": true,
// If set true, detects settings from the code in the file
"editor.detectIndentation": false,
},
// Editor settings for R files
"[r]": {
"editor.indentSize": 4,
"editor.tabSize": 8,
"editor.insertSpaces": true,
"editor.detectIndentation": false
},
// There isn't a formatter that works great with R itself
"editor.formatOnSave": false,
// Shows the difference between 4 spaces and 8 spaces (tab) visually
"editor.renderWhitespace": "all",
// Show whitespace changes in the diff editor to help us get it right
// Trim trailing whitespace after a line, or on a blank line.
// You may need to turn this off in some files where historically
// trailing whitespace has not been trimmed, but otherwise it is
// good practice to trim it.
"files.trimTrailingWhitespace": true,
// Turn off {languageserver} linting for R files
"r.lsp.diagnostics": false
}
```

## For Positron

If you already have an `EditorConfig` set-up, merge the settings below into it. Otherwise, create it with the settings below. These settings are the same as for VSCode, with the exception of `r.lsp.diagnostics` as Positron does not use a R language server.

```
{
// Editor settings for C files
// Cannot set to auto replace 8 spaces with tab (https://github.com/Microsoft/vscode/issues/ #42740, #5394)
"[c]": {
// An indent is 4 spaces
"editor.indentSize": 4,
// But display 8 spaces as a single tab
"editor.tabSize": 8,
// Need this to get indent size 4, else uses tabs to indent
"editor.insertSpaces": true,
// If set true, detects settings from the code in the file
"editor.detectIndentation": false,
},
// Editor settings for R files
"[r]": {
"editor.indentSize": 4,
"editor.tabSize": 8,
"editor.insertSpaces": true,
"editor.detectIndentation": false
},
// There isn't a formatter that works great with R itself
"editor.formatOnSave": false,
// Shows the difference between 4 spaces and 8 spaces (tab) visually
"editor.renderWhitespace": "all",
// Show whitespace changes in the diff editor to help us get it right
"diffEditor.ignoreTrimWhitespace": false,
// Trim trailing whitespace after a line, or on a blank line.
// You may need to turn this off in some files where historically
// trailing whitespace has not been trimmed, but otherwise it is
// good practice to trim it.
"files.trimTrailingWhitespace": true
}
```
2 changes: 2 additions & 0 deletions chapters/introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ The guide is intended as a comprehensive resource for contributing to base R. Th

- Tools that may be useful for R developers are available in the [Developer Tools](#sec-dev-tools) chapter.

- Editor settings for common IDEs are suggested in the [IDE Setup](sec-ide-setup) chapter.

- Additional resources for contributing to R are available in the [Additional Resources](#sec-additional-resources) chapter.

- The [R Core Developers](#sec-core-dev) chapter contains a list of the former and current members of the R Core Team who have write access to the R source.
Expand Down