-
Notifications
You must be signed in to change notification settings - Fork 121
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
olsp can keep incorrect document src in its state because of encoding issues #934
Comments
Shall we disable ocamlformat-rpc if it's not stable enough? |
I think we should disable it for formatting files. Seems fine enough for code snippets on hover, etc |
The rpc also doesn't respect a missing .ocamlformat in the project and formats files with default config, which is unacceptable for us |
I have a suspicion that legal code not being formatted is actually caused by our representation of document source code because I think I see "phantom" syntax errors (ie source is legit in the editor but there's a syntax error shown for strange position within the source). It could be the encoding or batching document updates PR at fault. #940 would make it easier to debug. |
I have a feeling that this bug was here all along. In fact, since the encoding PR, I haven't been able to reproduce it. Perhaps because neovim allows for utf8. It might be the bug is in the utf16 decoding? |
interesting. I never had this problem before, at least not past year. Indeed, vscode uses utf16 position encoding, so that may be the problem |
olsp sometimes formats code into illegal state, e.g., given file
olsp formats it to
trace (notice how ofmt says it's disabled but still formats code)
ofmt also sometimes gets stuck and can't get format; restarting olsp enables it to format again.
this must be some ofmt-rpc issue
The text was updated successfully, but these errors were encountered: