You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the following gif, the item should either not be present (because App is considered filter text), or should be in soft selection (no exact match).
However
In VSCode, we do not get callbacks for filtering. So if the item is originally hard selected, we cannot change to soft selection once the list is filtered down that much.
In VS, it looks like we consider 'App' as part of the completion item, but not in VSCode. Potentially we need to up[date what we consider as part of the filter text.
The text was updated successfully, but these errors were encountered:
I took a look at this today. There are a couple of differences when compared to VS.
In VS, completion does not show up at all when typing in front of App inside the <.
In VS, if you explicitly invoke completion (cntrl+space) when typing in front of App, completion shows up with an initial soft selection. If you start typing Project, ProjectResourceBuilderExtensions will be hard selected and committed if you type .. If you continue typing and type Projects, the item for ProjectResourceBuilderExtensions becomes soft selected, and will not be commited with ..
Unfortunately, VSCode has some limitations here that make the behavior here difficult to match VS.
The difference in completion showing up appears to be down to how completion is triggered. VSCode does not distinguish between invocation by typing a word character, and manual invocation via the keybind (cntrl+space). Both are classified as Invoked. VS does distinguish and so is able to provide different behavior for the typing scenario.
The difference in hard/soft selection updating is caused by a couple different limitations in VSCode
a. There is no soft selection in VSCode. We can only emulate it by adding or removing trigger characters (which we do).
b. VSCode does partial matching on the filter text (as long as the typed char matches somewhere after in the filter text, completion stays up).
b. VSCode does not call us back on list update, or commit. We only provide the list upfront. So when further typing happens that makes an item no longer fully match, we don't switch to soft selection (like we do in VS).
There's a couple of ways we may be able to make this better, but nothing extremely simple
Have VSCode distinguish between typing a word char and manual invocation. Then we can simply not show completion here like we do in VS.
Implement filtering and selection behavior entirely on the server side using the isIncomplete flag. This means the server gets a callback for every character typed and can manually adjust what items show in the list and what commit characters they have. However this is slower as we have to roundtrip to the server on every typed character.
My preference is 1), but requires work on the VSCode side to add the new kind (issue link TBD).
I would like to also point out that TypeScript in VSCode has the same behavior. So this is not unique to our extension:
In the following gif, the item should either not be present (because App is considered filter text), or should be in soft selection (no exact match).
However
The text was updated successfully, but these errors were encountered: