Skip to content
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

Fuzzy matching of snippets stopped working with inline snippet suggestions #49895

Closed
sierses opened this issue May 15, 2018 · 3 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug suggest IntelliSense, Auto Complete verified Verification succeeded
Milestone

Comments

@sierses
Copy link

sierses commented May 15, 2018

During the last couple of updates of VSCode Insiders, fuzzy matching for snippets when using "snippetSuggestions: inline" has stopped working.

This is what I get:
2018-05-15_04-15-55
Version 1.24.0-insider
Commit 5d12f53
Date 2018-05-14T05:16:26.538Z

This is what I expect:
2018-05-15_04-19-55
Version 1.23.1
Commit d0182c3
Date 2018-05-10T17:11:17.614Z

"snippetSuggestions: top" still performs fuzzy matching for snippets just fine.
Fuzzy matching for everything else also appears to be fine.

  • Does this issue occur when all extensions are disabled?: Yes
    I tested this with default snippets only (no extensions) and with snippet extensions enabled.
  • OS Version: Windows 10
@vscodebot
Copy link

vscodebot bot commented May 15, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@sierses
Copy link
Author

sierses commented May 15, 2018

Upon further examination I've located the setting that causes this issue to occur.

  "emmet.includeLanguages": {
    "javascript": "javascriptreact",
  },

This setting has worked normally for at least the past 10 months, and still works fine in v1.23.1.

I also tested some JSX files. Javascript React code is showing the same symptoms both with and without that setting enabled (which shouldn't have any effect anyway).
This leads me to believe that the issue is with javascriptreact.

@jrieken jrieken assigned ramya-rao-a and unassigned jrieken May 15, 2018
@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented May 16, 2018

@sassjajc Thanks a lot for reporting and finding the connection with emmet

@jrieken In the below adopt function, the items from the end of the array keep getting deleted which is causing this issue. This actually ends up deleting almost of half the items in the array.

https://github.com/Microsoft/vscode/blob/ab78dc7eba36a6079d7123cd891b9a92f56323c9/src/vs/editor/contrib/suggest/completionModel.ts#L107-L121

When editor.snippetSuggestions is set to top, the snippets are in the front of the array and so are saved from the deletes above.

The above code is only reached when there are completion results of incomplete type and when subsequent letters of the word are typed. Since emmet contributes such results, this issue is only seen in js files when emmet is enabled

This change got introduced in ab78dc7#diff-6dba103c08842c74d9919a87c5561c11 and so the issue is only visible in the Insiders

@ramya-rao-a ramya-rao-a assigned jrieken and unassigned ramya-rao-a May 16, 2018
@ramya-rao-a ramya-rao-a added suggest IntelliSense, Auto Complete bug Issue identified by VS Code Team member as probable bug labels May 16, 2018
@ramya-rao-a ramya-rao-a added this to the May 2018 milestone May 16, 2018
@roblourens roblourens added the verified Verification succeeded label May 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug suggest IntelliSense, Auto Complete verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants