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 might have something wrong with my config but I can't figure out what. I am using vscode with the R extension using the languageserver. R is configured correctly (I think) such that I can run scripts, view plots, etc. Linting works as well.
Formatting does not seem to run through the styler package as expected.
As you can see, the lack of spaces in the last line is fixed. However, the indentation is using 4 spaces, not 2 spaces. The linter yells at me because of the wrong number of spaces.
If I use styler directly on the file (i.e. by opening an R terminal, and running the command style_file("/path/to/file.R")), I get the following:
I might have something wrong with my config but I can't figure out what. I am using vscode with the R extension using the languageserver. R is configured correctly (I think) such that I can run scripts, view plots, etc. Linting works as well.
Formatting does not seem to run through the
styler
package as expected.Here is a file before formatting:
And after formatting using the languageserver functionality in vscode (
Right click > Format Document
):As you can see, the lack of spaces in the last line is fixed. However, the indentation is using 4 spaces, not 2 spaces. The linter yells at me because of the wrong number of spaces.
If I use styler directly on the file (i.e. by opening an R terminal, and running the command
style_file("/path/to/file.R")
), I get the following:In this case, the indentation is correct.
Any advice?
The text was updated successfully, but these errors were encountered: