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
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Add snippets, with all the normal options, a name, and a scope selector.
Remove snippets, with all the normal options, a name, and a scope selector.
Read snippets with a selector argument and prefix, returning its name and a deep clone of its options.
Use cases
Macro system
I want to implement a very powerful macro system for Atom on top of this package, to make it feel native. That's a feature that I know is in high demand. I also want to provide an eady way to manage existing macros, but the other facilities I need for that already exist.
This will require the following:
Adding new snippets to act as macros.
Looking up existing snippets by prefix to save old state instead of overriding them permanently.
Removing formerly added ones.
Intelligent autocomplete
This could be used to build a more powerful autocomplete, where someone could make snippets based on the type, or snippets that are only active in certain contexts. One example of this would be defining geti -> getElementById JavaScript snippet only when the parent is document, but not existing elsewhere since it's usually irrelevant in those places.
Also, Atom TypeScript could use this to do Eclipse-like autocomplete, where if you might autocomplete a function, it instead generates an anonymous snippet for that item, and inserts that with the correct arguments, denoting types as well, much like what an IDE would.
declarefunctionfunc(buffer: Buffer,name: string): void;func// <tab>func(buffer,name)// filled in variable names, `buffer` is currently highlighted
This will require the following:
Adding new snippets for parameterized autocomplete.
Reading existing snippets by prefix to copy and temporarily override them.
Removing formerly added ones, as they're only necessary when initializing autocomplete.
This is technically a partial duplicate of #100 and #181, but much more detailed and complete than either. It would also offer an indirect fix for #109, #107, #155, and probably others, and it is related to #33.
The text was updated successfully, but these errors were encountered:
On a tangentally related side note, I hate GitHub outages (this would've been filed two hours ago if that didn't happen right as I was about to submit...thank God for copy+paste).
Summary
What I'm proposing is a new provided service to manipulate snippets programmatically. Such a service would have to do the following:
Use cases
Macro system
I want to implement a very powerful macro system for Atom on top of this package, to make it feel native. That's a feature that I know is in high demand. I also want to provide an eady way to manage existing macros, but the other facilities I need for that already exist.
This will require the following:
Intelligent autocomplete
This could be used to build a more powerful autocomplete, where someone could make snippets based on the type, or snippets that are only active in certain contexts. One example of this would be defining
geti
->getElementById
JavaScript snippet only when the parent isdocument
, but not existing elsewhere since it's usually irrelevant in those places.Also, Atom TypeScript could use this to do Eclipse-like autocomplete, where if you might autocomplete a function, it instead generates an anonymous snippet for that item, and inserts that with the correct arguments, denoting types as well, much like what an IDE would.
This will require the following:
This is technically a partial duplicate of #100 and #181, but much more detailed and complete than either. It would also offer an indirect fix for #109, #107, #155, and probably others, and it is related to #33.
The text was updated successfully, but these errors were encountered: