I have a suggestion for the code editor in Fire when editing Mercury. I’m not sure that code completion when declaring a variable makes sense when typing the “As” segment of the declaration. Because it is only two letters, I’m unlikely to use code completion, and it actually seems to cause problems if I type “as” instead of “As” - it picks something completely different than what I want. (In the example below, I didn’t press Enter to select the suggestion - this is what happens when type “as” and then a space.) Because VB is case-insensitive, I usually don’t capitalize the “as” while I’m typing, so this was kind of shocking at first.
Here’s a short video that shows what I mean:
My recommendation is to eliminate code completion for Mercury for that segment of variable declaration (as Visual Studio seems to do), or make it case-insensitive so that it correctly picks up what most people would want in this case (“as”) and not something else. Obviously there should still be code completion after that part of the variable type.
I think the real problem her tis that CC shows stuff that actually *isn’t’ valid (possibly paired with the fact that as<space> should probably always pick "as and no trigger variant.
That said, I cannot repro the second part; ig I just ignore CC and type through “A S SPACE”, I get As, not something else/wrong…
THAT said, while CC is driven by the compiler itself, it doesn’t all come “free” and many places need to be fine-tuned especially for CC — and I’m sure there’s still many areas that aren’t perfect, so please do let me know about any you find.
The rules are as follows:
CC should only ever show tokens that will be valid tab the current position. if only an unknown token is valid (e.g. after Dim), you should see "nothing to complete)
All valid (known) items should e in CC, so there’s never a case where something valid (and known) is missing
if unknown tokens are valid next to known ones, CC selection will be “soft” and should only accept for enter, not space). I cant think of a good example in VB, but eg in C#, .Where(| would accept a new lambda var: