Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading syntax file ST4, Debian 11 "Bullseye" #82

Open
gusrub opened this issue Dec 29, 2021 · 4 comments
Open

Error loading syntax file ST4, Debian 11 "Bullseye" #82

gusrub opened this issue Dec 29, 2021 · 4 comments

Comments

@gusrub
Copy link

gusrub commented Dec 29, 2021

Getting the following error while sublime text opens and tries to load the syntax highlighting plugin support:

Error loading syntax file "Packages/Ruby Slim/Syntaxes/Ruby Slim.tmLanguage": 
Error in regex: target of repeat operator is invalid in regex (?<!\\)(#).$$?

And this is the full output of the console related to that:

Error loading scope:source.erb: Unable to find syntax file for scope "source.erb" in Packages/Ruby Slim/Syntaxes/Ruby Slim.tmLanguage
Error loading scope:source.less: Unable to find syntax file for scope "source.less" in Packages/Ruby Slim/Syntaxes/Ruby Slim.tmLanguage
error: Error loading syntax file "Packages/Ruby Slim/Syntaxes/Ruby Slim.tmLanguage": Error in regex: target of repeat operator is invalid in regex (?<!\\)(#).*$$?

Let me know if I can help with some debugging information or something.

@timfjord
Copy link

I am experiencing the same issue(I am on macOS)
I did some research and it looks like there are problems with the coffee part here https://github.com/slim-template/ruby-slim.tmbundle/blob/master/Syntaxes/Ruby%20Slim.tmLanguage#L97-L119

As a workaround the syntax file can be overriden (the path should be Packages/Ruby Slim/Syntaxes/Ruby Slim.tmLanguage) and the section between lines 97 and 119 should be commented out.
Most likely it will break highlighting of CoffeeScript within slim files, but it is better than nothing.

@gusrub
Copy link
Author

gusrub commented Jan 18, 2022

@timfjord Hey, thanks for the tip! I actually disabled/removed coffeescript language support package and now the slim syntax files are highlighted properly so I guess it does have something to do with the combination of Coffee and Slim 🤷🏻

@timfjord
Copy link

timfjord commented Jan 18, 2022

I played a bit with Coffee and Slim and it looks like the issue is in the Better CoffeeScript plugin(I bet you use this plugin on your machine).

In particular there are issues with parsing Coffee comment. Slim is complaining because it embeds the Coffee syntax.
I was able to fix it by reinstalling the Better CoffeeScript plugin so the workaround is no longer needed

@gusrub
Copy link
Author

gusrub commented Jan 18, 2022

timfjord

Interesting! I will try it tomorrow. I'm trying as much as I can to migrate our CoffeeScript code to ECMA to be honest because coffee is not something I enjoy, the language, not the drink 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants