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
Autocomplete not behaving properly for semi-colons (;) #1890
Comments
@freebroccolo Do you think this is related to ocaml-language-server? I don't see anything like this in vim without LSP. |
I'm not sure if it's due to the server or maybe due to the extension and how the word classification is handled (in conjunction with whatever the user editor suggest settings are). I haven't been using the extension/server with Reason much lately but I haven't seen this with OCaml. Does it happen with Atom (using the language server)? @knyzorg In vscode, when you go to the user settings panel (cmd+, on macOS), can you do a search for "editorsuggest" (one word, no spaces) and tell me the values of the settings that show up there? |
I have no user-settings that override the defaults with the exception of these:
For atom, I tried triggering the issue but was not able to. It seems to be back to a VSCode issue. |
Another thing, if I trigger the autocomplete on nothing, I get it as first suggestion: I'm suspecting that the bug I describe above is the consequence of this one. I have no idea how it all works under the hood, I'm just trying to learn the language for now. Could it be that an Just thinking out loud. |
First of all, the reason these suggestions are showing up is due to the "quick suggestions" feature of vscode. I have this disabled globally for all modes because I find it way too noisy and the suggestions often not relevant:
When you have this set, the vscode extension will only automatically trigger completions on things like The "quick suggestion" completions are (as far as I understand) calculated in an approximate way from the contents of the editor buffers. Personally, I would suggest disabling it. I think these strings might be included in the "quick suggestions" because I am using a more relaxed word-pattern than usual. This is for compatibility with another one of my extension vscode-input-assist. I can try experimenting with that pattern to see if it's possible to exclude some cases like the one you show above. I imagine there are probably other ones though and I'd prefer to retain compatibility with |
I just started experimenting with Reason using VSCode and the the first string I typed |
If someone wants to try changing the word pattern for the extension and seeing if it has an effect on this, you can modify it here. |
This issue really belongs on the vscode-reasonml repo -- it doesn't have to do with the code in this repo. |
If I put a string inside a .re file such as
An autocomplete appears for semi-colons suggesting the snippet above. It is very annoying and the autocomplete selects it and inserts it by pressing which a common thing to do after placing a semi-colon.
The issue is not present in any other languages which leads me to assume it is a problem not with VSCode but with the Reason IDE toolchain or some other component of the Reason toolchain.
Gif inserted below to demonstrate the issue.
The text was updated successfully, but these errors were encountered: