Sublime Forum

CSS Stylus tmLanguage

#1

I was wondering if someone could help me out here. I am trying to use Stylus a css compiler for node/expressjs but when I add the tmLanguage bundle fo syntax highlighting sublime locks up. I just made a folder in ~/.Sublime Text 2/Packages/Stylus and added the tmLanguage file. When I start sublime text and select a stylus file it reads it as plain text then when I select stylus in the syntax menu sublimetext locks up and my cpu just runs at 100% til I kill sublime text.

Here is a link the tmLanguage file.
github.com/LearnBoost/stylus/bl … tmLanguage

Any thoughts or insight would be great.

Thanks

0 Likes

#2

Anybody willing to try the tmLanguage bundle to see if they are getting the same results as me?

Thanks

0 Likes

#3

I believe there is a difference in handling regexs in tmLanguage files that match 0 characters between Sublime Text and TextMate. It’s something I’m planning on looking into, but it’s not at the top of the priority list.

0 Likes

#4

Thanks for the heads up jps. I understand this is not a high priority, but I look forward to a fix.

Thanks

0 Likes

#5

I got the same 100% CPU problem with this tmLanguage file that you did. I just purchased Sublime on Linux. I’m going to play around with modifying the file tonight to see if I can fix the problem and get Stylus support in Sublime :smile:

0 Likes

#6

Have you been able to accomplish some progress?

0 Likes

#7

Using build 2060 here. Not getting any 100% CPU thing, but the file appears empty when I try to open it.

0 Likes

#8

Yeah, that’s one reflectuin of the issue.

Now try opening a *.styl file first, then copy the .tmLanguage file to the Stylus folder in ST’s Packages.
Then, in ST, go to View > Syntax > Stylus.
You’ve got a locked up Sublime Text window and 100% cpu usage. Or don’t you?

0 Likes

#9

Yep. That locked it up. Now I know not to do that. :open_mouth:

As mentioned here;
github.com/LearnBoost/stylus/is … nt_1331098

Apparently replacing the “&” with “&” fixes it.

0 Likes

#10

Got a solution!

You can get a working file Here.
(Both Sublime Text 2 and 1)

0 Likes