New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: styler fails #275
Comments
Quick workaround: Create
Use this config:
|
@6801318d8d solution did not work for me (on save). It seemed to try to format the old save file without your newest changes, instead of saving your changes to the file and then applying formatting. This meant that all changes since last save would disappear. I got it to work by adding
The rprettify script can then be simplified to:
I guess you should be able to just copy and paste this command into the above formatter, but I did not test that. I actually prefer this solution over having to rely on another r package, so I will keep it personally. |
Do you see any error in the logs? I'm confused as to what is going wrong |
I had the same error as OP. The solution provided by @BlackEdder worked for me! |
Neovim version (nvim -v)
0.9.5
Operating system/version
Arch Linux
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
10:57:10[DEBUG] Running formatters on test.R: { "styler" }
10:57:10[INFO] Run styler on test.R
10:57:10[DEBUG] Creating temp file .conform.7244551.test.R
10:57:10[DEBUG] Run command: { "R", "-s", "-e", "r.nvim::format()", "--args", ".conform.7244551.test.R" }
10:57:10[DEBUG] styler exited with code 0
10:57:10[DEBUG] Cleaning up temp file .conform.7244551.test.R
Describe the bug
Formatting R code has no effect
r.nvim is working, and the command line that conform.nvim is trying to run is working as well:
r.nvim
is not installedWhat is the severity of this bug?
breaking (some functionality is broken)
Steps To Reproduce
See above
Expected Behavior
R code should be formatted, code inside function should be indented
Minimal example file
df <- function(a,b) {
print("ciao")
c = a+b
print(paste0(c))
}
Minimal init.lua
Additional context
none
The text was updated successfully, but these errors were encountered: