lennart / sublime-node-mocha

Syntax Highlighter and Snippets for mocha (node.js)
5 stars 6 forks source link

CoffeeScript version #4

Open Benibur opened 11 years ago

Benibur commented 11 years ago

hello,

I forked your project in order to adapt it to a CoffeeScript syntax. You can see this in this branch : https://github.com/Benibur/sublime-node-mocha/tree/feature/mocha-snippets-in-coffee

1/ Do you think it would be possible to have both syntax in the same plugin ? If yes I could help to maintain the coffeescript part.

2/ Do you know if two syntax can be set to an opened file in ST ? it could be usefull to have both mocha and javascript enabled so that both plugins could suggest snippets.

Benjamin

lennart commented 11 years ago
  1. It may be possible though I'm not sure whether one would need it. People who use both syntaxes can easily install the coffee version through package control (though I haven't submitted it to their repo I guess)
  2. I include javascript syntax in the language definition, although it seems to be overriden by certain matchings. I need to look into that. Feel free to check as well…
Benibur commented 11 years ago

1/ i agree, very few people would need it, but it would be easier to maintain 1 plugin instead of 2 : both would be nearly identical.

2/ "I include javascript syntax in the language definition" : it seems not to work for me : were is this done ? in Mocha.JSON-tmLanguage ?

I am not aware of sublime package definition, do you have recommandations to jump into this ?

lennart commented 11 years ago
  1. I'm not sure to minimize the duplication of snippet code to be written. One would need to update both snippets (coffee & js) if something in mocha changes. Same goes for the language specs. Apart from two separate repos I can't see any benefit of putting both into one plugin
  2. I think I read other language specs for details (not sure which one sported the include syntax). Otherwise I read these docs: