-
Notifications
You must be signed in to change notification settings - Fork 42
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
Stops working after it attempts to modify an "unmodifiable" file #44
Comments
Here's an excerpt from the file logged by parinfer. Buffer 61 was created from a long-running nvim session where parinfer has stopped working, and buffer 1 is from a fresh nvim session where parinfer is working. I just entered the
|
Hi! There's a couple of possibilities. It looks like If that's not it, make sure you are using the latest, since there were issues with reference counting the library that would make it stop working after some number of invocations. This was mostly on Mac, though it would probably affect other BSDs. If you are using a non-common OS, there's a chance that the reference counting hack is not working for your OS, so let me know what OS you are running. |
Thanks for the response. I have verified I'm on the latest version, and use Void Linux 4.19.48_1. It occured again so I It seems to get stuck in "paren" mode when I've been in a buffer and editing for a while. I think perhaps when I undo editing some forms. |
@uosl Do you have an idea what might be triggering the mode change? |
No, sorry. I have experienced it a few more times (once today) but haven't been able to reproduce it when it happened. It definitely happens while editing in normal mode though. |
@eraserhd Great news! I finally found the culprit. It's not related to the running length of a session, and occurs when switching into a neovim terminal with parinfer running (I set
When this happens, I will close this issue since it's no longer relevant, but this finding leads me to two new questions:
If you want to reproduce this, you'll need to use neovim and evaluate the auto |
Nice, thanks for finding this! Yes, parinfer should definitely not try to modify a read-only buffer. I'm going to re-open this issue and update the title. |
Ah excellent, I came here to request this very feature. I often view diffs in Vim, when the original file contains an error then parinfer creates a change against the file meaning ":qa" won't close the buffer. In this case, the original file is "modifiable" but "readonly". |
As far as I understand, |
After running nvim with parinfer-rust for many hours, parinfer will suddenly stop completing parens, fixing parens when changing indentation, and everything else the plugin usually does. This will apply to any buffer, so even when opening new files with a filetype that should trigger parinfer, it won't start again.
Since I can't find any existing issue on this, I guess there's something very specific in my init.vim that causes it to fail. Sadly, I haven't been able to find out what action causes parinfer to fail, and using a minimal init.vim for hours to test if that resolves the issue is not viable.
Using
:ParinferOff
and:ParinferOn
has no effect. The only way I've found to get parinfer working again is by restart nvim.Sorry for the lackluster report, but this is something I've found difficult to investigate.
I'm going to try and play with
:ParinferLog
and see if it prints anything interesting next time it happens. I'd also appreciate it if you have any ideas to troubleshoot this.The text was updated successfully, but these errors were encountered: