Guidelines to convert language from TextMate bundles to Atom?


#1

I would like to make a language package based on a TextMate bundle (pretty much the way many Atom language packages are built)

However I don’t quite understand how to properly convert it (which files in TextMate bundle becomes what files in Atom, etc)

A little help will be very awesome :smile:


#2

Never mind. :monkey_face:

https://atom.io/docs/v0.62.0/converting-a-text-mate-bundle


#3

A slight problem is that there is no way to set the order of which language package uses first while the same pattern matched (try installing PHP Twig and open a php file)


#4

Sorry for the necro, but could someone tell me how to convert the following language from TextMate bundles to Atom?

I tried with

apm init --package ~/.atom/packages/language-weidu \
--convert https://github.com/AstroBryGuy/textmate-weidu/tree/master/WeiDU.tmbundle

but it doesn’t work (i.e., my files are still considered as plain text, I cannot see the syntax highlighted…)

Any help would be really appreciated…


#5

Did it create a grammar successfully? If so, you should share it with us so that we can see if it should work.


#6

Nope, there’s no folder called grammar in ~/.atom/packages/language-weidu…


#7

To be honest, I’m currently getting this error:

Download failed (404 Not Found)
stream.js:74
      throw er; // Unhandled stream error in pipe.
      ^

Error: incorrect header check
    at Zlib._handle.onerror (zlib.js:370:17)

#8

That sounds like a bug.


#9

@annthurium

You are one of the developers of Atom, right? Please, could you have a look at this issue? Thanks in advance…