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
Second, we can provide visual cues when a snippet is expanding (either by user-defined keymaps and/or themes).
Third, package authors could query for this class on the text editor to avoid doing things that might break snippet expansion - for example, formatting the source code. Two packages that suffers from this is parinfer and parinfer-plus (they try to infer parenthesis just after someone types in the editor, and the snippets package understands that there was an user action, terminating the snippet insertion)
Any alternatives?
Callbacks, or using some "provider/consumer" pair, but I feel these are less powerful (they don't allow for visual customization nor themes)
Other examples:
No response
The text was updated successfully, but these errors were encountered:
Have you checked for existing feature requests?
Summary
When expanding snippets, we can add a class to the editor
inserting-snippets
or even onlysnippets-active
.What benefits does this feature provide?
First, we can simplify this file: https://github.com/pulsar-edit/snippets/blob/master/keymaps/snippets-2.cson and its implementations by registering keymaps only to
atom-text-editor.inserting-snippets
for example.Second, we can provide visual cues when a snippet is expanding (either by user-defined keymaps and/or themes).
Third, package authors could query for this class on the text editor to avoid doing things that might break snippet expansion - for example, formatting the source code. Two packages that suffers from this is
parinfer
andparinfer-plus
(they try to infer parenthesis just after someone types in the editor, and the snippets package understands that there was an user action, terminating the snippet insertion)Any alternatives?
Callbacks, or using some "provider/consumer" pair, but I feel these are less powerful (they don't allow for visual customization nor themes)
Other examples:
No response
The text was updated successfully, but these errors were encountered: