-
Notifications
You must be signed in to change notification settings - Fork 189
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
rubocop formatter erases buffer #251
Comments
Are you using a ruby manager, like I use Below are the ex commands I run to illustrate what I mean:
|
In my case the same version of ruby I normally would be (the asdf one):
What seems to be causing the problem is invalid Ruby syntax - the formatter instead of giving up and coughing up an error message deletes the buffer contents. Here's the
Fixing the error fixed the formatter |
I was using a Ruby installed via Nix. I can't provide any more help with this, as I've switched to Kakoune some months ago and removed my vim configuration. If someone wanted to go to the effort to reproduce I can give you my dotfiles at the relevant version but they're fairly idiosyncratic—definitely better to reproduce using another person's setup if possible. |
I somehow get the same problem today. It deletes all of my code. Has anyone found a solution for this? |
Sorry for digging this issue out, but I just searched for the solution, and since this is an open issue which has not been closed since, I wanted to share the solution for the people suffering of this problem: For me, the problem was, that I just set up a new Mac and hence didn't had So this said, I don't know, if this is an issue, which needs to be addressed by |
Using 528b5e4, neovim v0.3.8
When I run
:Neoformat
using the rubocop formatter, my buffer gets erased. Here's what the output looks like withg:neoformat_verbose = 1
:When I run that command in the same shell as vim, it prints to stdout correctly. (
rubocop --auto-correct --stdin "simple.rb" 2>/dev/null < simple.rb | sed "1,/^====================$/d"
)What else can I give you to help with this? I'd offer to open a PR but I don't have any idea where to look!
The text was updated successfully, but these errors were encountered: