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

Allow snippets to control the scope to which they are applicable #22661

Closed
jrieken opened this issue Mar 15, 2017 · 5 comments
Closed

Allow snippets to control the scope to which they are applicable #22661

jrieken opened this issue Mar 15, 2017 · 5 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality snippets

Comments

@jrieken
Copy link
Member

jrieken commented Mar 15, 2017

We know have solid information about the current position/cursor being in a string, in a comment, in a regex, and elsewhere. We should expose this to snippet authors such that their snippets can express where they want to show

@jrieken jrieken self-assigned this Mar 15, 2017
@jrieken jrieken added feature-request Request for new features or functionality snippets labels Mar 15, 2017
@jrieken jrieken added this to the March 2017 milestone Mar 15, 2017
@jrieken
Copy link
Member Author

jrieken commented Mar 15, 2017

Strech for march...

@CoenraadS
Copy link
Contributor

Could exposing this information about an arbitrary position being a string/comment etc also be available as an extension API?

@jrieken
Copy link
Member Author

jrieken commented Mar 15, 2017

re #22661 (comment) that's actually a lot, lot more complex because token scan change a lot while you type and we would need to eagerly synchronize that to the extension host process which is quite expensive. There are ideas about tokenising in the ext host but nothing real yet

@jrieken
Copy link
Member Author

jrieken commented Dec 11, 2017

Idea is to have .code-snippet-files which contain a scope attribute (similar to how others do it). Unsure yet if such files should be just one snippet or multiple...

@jrieken
Copy link
Member Author

jrieken commented Dec 11, 2017

closing this as dupe of #13182

@jrieken jrieken closed this as completed Dec 11, 2017
@jrieken jrieken added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 11, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) feature-request Request for new features or functionality snippets
Projects
None yet
Development

No branches or pull requests

2 participants