Skip to content

Commit 70fb5de

Browse files
authored
Merge pull request #12405 from quarto-dev/format-with-air
add air configuration for R files and format
2 parents 6366d51 + 28a208d commit 70fb5de

72 files changed

Lines changed: 1157 additions & 805 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.air.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[format]
2+
line-width = 80
3+
indent-width = 2
4+
indent-style = "space"
5+
line-ending = "auto"
6+
persistent-line-breaks = true
7+
exclude = []
8+
default-exclude = true

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"denoland.vscode-deno",
44
"esbenp.prettier-vscode",
55
"sumneko.lua",
6-
"nvarner.typst-lsp"
6+
"nvarner.typst-lsp",
7+
"Posit.air-vscode"
78
]
89
}

.vscode/settings.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
"editor.defaultFormatter": "denoland.vscode-deno"
44
},
55
"[r]": {
6-
"editor.formatOnSave": false,
7-
"editor.defaultFormatter": "REditorSupport.r"
6+
"editor.formatOnSave": true,
7+
"editor.defaultFormatter": "Posit.air-vscode"
8+
},
9+
"[quarto]": {
10+
"editor.formatOnSave": true,
11+
"editor.defaultFormatter": "quarto.quarto"
812
},
913
"[html]": {
1014
"editor.formatOnSave": false
@@ -16,5 +20,7 @@
1620
"deno.lint": true,
1721
"deno.unstable": true,
1822
"deno.importMap": "./src/import_map.json",
19-
"deno.disablePaths": ["tests/integration/playwright/"]
23+
"deno.disablePaths": ["tests/integration/playwright/"],
24+
// opt-out lintr as we use air formatter
25+
"r.lsp.diagnostics": false
2026
}

src/resources/capabilities/knitr.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ if (requireNamespace("rmarkdown", quietly = TRUE)) {
2323
cat("null")
2424
}
2525
cat("\n")
26-
cat("--- YAML_END ---\n")
26+
cat("--- YAML_END ---\n")

0 commit comments

Comments
 (0)