rundis / lt-snippets

Snippets/templates support for Light Table
MIT License
12 stars 4 forks source link

Support multiple modes for snippet(s) #4

Closed rundis closed 10 years ago

rundis commented 10 years ago

Mode currently maps to an editor tag for scoping snippets. You might want to reuse snippets across different editor tags. In addition you might want to do it at individual snippet level rather than by group.

Suggest the following changes:

  1. Change mode at group level (.edn file level) to take a vector for the mode property. Change scoping to use a set inclusive test with editor tags when resolving a snippet
  2. Add optional mode property for snippet level definition. If specified overrides group level definition
rundis commented 10 years ago

Decided to go for a solutions somewhat similar to behaviors in Light Table core.

rundis commented 10 years ago

Fixed in 0.0.2

cldwalker commented 10 years ago

Awesome and using https://github.com/cldwalker/ltfiles/blob/9f35c5991a37d2a387f475e2de503664c8780501/settings/snippets/clojure/clojurescript.edn#L1 :)

rundis commented 10 years ago

Excellent !