You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I imagine this is happening because VS Code / Positron default to 4 spaces for R code, and the forward propagation tries to respect that until you create a project with an actual air.toml file.
If you're working in a project and create an empty air.toml file at the project root, then Air will start using 2 spaces (its default) rather than trying to respect the 4 space default that VS Code is trying to give you
Unfortunately, I have been unable to get air working in VS Code due to the continuing lintr conflict. In my case, I am simply unable to turn lintr off through the recommended "r.lsp.diagnostics": false setting. There's actually an upvoted comment on this very problem in the link that @lionel- provided above. (The issue was supposedly fixed here, but from a quick inspection of the related issue thread(s), I'm not the only person still struggling with it.)
Regardless---and while this obviously isn't air's fault---I do think a more explicit note/caveat in the documentation would be helpful.
@DavisVaughan ya, those seem to work just fine. (I was/am using the second example here.) I have no idea why these overrides work, but setting "r.lsp.diagnostics": false doesn't ¯_(ツ)_/¯
Again, probably not much that you can do on the air side beyond a note in the documentation.
Activity
lionel- commentedon May 9, 2025
It looks like the only options are turning of
languageserver's diagnostics altogether, or configuring~/.lintr:https://stackoverflow.com/questions/68858490/disable-r-linting-in-vscode
Since lintr is an out-of-the-box feature of
languageserverand vscode-R, we should mention this issue in Air's documentation for VS Code.DavisVaughan commentedon May 9, 2025
I imagine this is happening because VS Code / Positron default to 4 spaces for R code, and the forward propagation tries to respect that until you create a project with an actual
air.tomlfile.If you're working in a project and create an empty
air.tomlfile at the project root, then Air will start using 2 spaces (its default) rather than trying to respect the 4 space default that VS Code is trying to give youjhk0530 commentedon May 18, 2025
I solved this issue with step below
lintr. since I run R code in Rstudio, it's fine.Airextension in vscodeNow I'm enjoying air in vscode well. Thank you all
grantmcdermott commentedon Jun 5, 2025
I don't think this issue should be closed, given that the
airdocumentation hasn't been updated yet per @lionel-'s comment.grantmcdermott commentedon Oct 2, 2025
Quick follow-up on this:
Unfortunately, I have been unable to get
airworking in VS Code due to the continuinglintrconflict. In my case, I am simply unable to turnlintroff through the recommended"r.lsp.diagnostics": falsesetting. There's actually an upvoted comment on this very problem in the link that @lionel- provided above. (The issue was supposedly fixed here, but from a quick inspection of the related issue thread(s), I'm not the only person still struggling with it.)Regardless---and while this obviously isn't
air's fault---I do think a more explicit note/caveat in the documentation would be helpful.DavisVaughan commentedon Oct 3, 2025
@grantmcdermott can't you individually turn off the indentation and line length linters?
grantmcdermott commentedon Oct 3, 2025
@DavisVaughan ya, those seem to work just fine. (I was/am using the second example here.) I have no idea why these overrides work, but setting
"r.lsp.diagnostics": falsedoesn't ¯_(ツ)_/¯Again, probably not much that you can do on the
airside beyond a note in the documentation.Cheers
DavisVaughan commentedon Oct 4, 2025
A few other workarounds / solutions to look at
r.lsp.diagnosticssetting does not work REditorSupport/vscode-R#1196 (comment)r.lsp.diagnosticssetting does not work REditorSupport/vscode-R#1196 (comment)r.lsp.diagnosticssetting does not work REditorSupport/vscode-R#1196 (comment)Most interesting is
options(languageserver.diagnostics = FALSE)in.Rprofileif we were going to document something?eitsupi commentedon Sep 22, 2026
IMO this should be fixed on the vscode-R side.
Please vote REditorSupport/vscode-R#1749