-
Notifications
You must be signed in to change notification settings - Fork 130
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
Mark jsdoc types with meta.embedded #537
Comments
Will look into submitting this fix upstream against atom-javascript where we get the jsdoc grammar from |
microsoft/TypeScript-TmLanguage#537 VS Code uses the meta.embedded scope to mark sections of strings or comments as actually being code instead of string or comment content. This change adds the meta embedded scope to the contents of jsdoc types
microsoft/TypeScript-TmLanguage#537 VS Code uses the meta.embedded scope to mark sections of strings or comments as actually being code instead of string or comment content. This change adds the meta embedded scope to the contents of jsdoc types
Do your scope selectors work like ours? If so, it's a simple addition to hide unwanted suggestions: -comment.line
-comment.block
+comment.documentation I'm guessing something like that should work...? |
@Alhadis We look at the entire scope stack. For code: /**
* @type {foo}
*/
Since there is a comment scope in the stack, we disable quick suggestions here currently. If the stack had a
that would override this behavior and turn quick suggestions back on |
We added a way to explicitly override the token kind (string vs comment vs language) per scope in VS Code: microsoft/vscode@d74145e This accomplishes the same thing as using |
Problem
Quick suggestions do not currently appear when typing in jsdoc type fields:
This is because vscode sees the
comment
scope of the jsdoc type and disables quick suggestions here.Proposed Fix
microsoft/vscode#34857 uses the
meta.embedded
scope to re-enable quick suggestions inside of JS/TS strings or comments. If we mark all jsdoc type fields asmeta.embedded.inline.typescript
, quick suggestions will show upThe text was updated successfully, but these errors were encountered: