ruby-slim.tmbundle
ruby-slim.tmbundle copied to clipboard
Error loading syntax file ST4, Debian 11 "Bullseye"
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.
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.
@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 🤷🏻
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
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 😁