-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Provide way for a language to re-enable editor.quickSuggestions inside of a string or comment #34857
Comments
Actually that proposal may not work since we only enter the Edit |
Fixes microsoft/vscode#34857 See microsoft/vscode#34857 for more details about this issue
@mjbvz Not sure if this issue should be automatically closed. Leaving it up to you. The PR is in and published, and vscode-textmate updated in vscode. |
Thanks @alexandrudima! Yes there are still a few edge cases to handle still but the original issue has been addressed |
Problem
Many languages allow embedding language fragments inside of strings. In JavaScript for example:
`Max int: ${Number.MAX_SAFE_INTEGER}`
While typing within the
${...}
however, we do not show quick suggestions. The root cause is that the template expression is within a string, and theeditor.quickSuggestion.strings
setting explicitly disable quick suggestions within strings.Proposal
We now have a convention of marking languages embedded within strings with the
meta.embeded
scope. This could be used to reset the quick suggestions scopes.Here's the scope of the above code:
In this stack, we'd first see
string.template
which would disable quick suggestions. Then, further up the stack, we seemeta.embedded
which would reset the quick suggestion mode.The text was updated successfully, but these errors were encountered: