ruby-slim.tmbundle icon indicating copy to clipboard operation
ruby-slim.tmbundle copied to clipboard

Syntax highlighting not working

Open brauliobo opened this issue 10 years ago • 11 comments

Please take a look at https://github.com/CIRANDAS/noosfero-ecosol/blob/master/plugins/delivery/views/delivery_plugin/admin_method/_edit.html.slim

Only elements are being highlighted.

Reported on https://github.com/github/linguist/issues/2467

brauliobo avatar Aug 04 '15 22:08 brauliobo

This issue is fixed in Slim 2.0.

Slim 2.0 for ST4 has been released at Package Control, with source moved to https://github.com/SublimeText/Slim.

Ruby syntax itself may require some tweaks, but Slim handles everything fine on its end.

grafik

deathaxe avatar Jan 13 '23 16:01 deathaxe

@deathaxe I'm trying to get this package integrated into linguist (see the issue mentioned above) to address the syntax not working, but I get the following error when attempting to do that.

Any idea why it would say it couldn't find a grammar?

Image

Jeremy-Walton avatar Jun 25 '25 15:06 Jeremy-Walton

@deathaxe Is this something that could be added so we have have nice formatting on GitHub?

Image

Jeremy-Walton avatar Jun 25 '25 16:06 Jeremy-Walton

The referenced Slim 2.0 syntax is a Sublime Text specific syntax definition which does not work with linguist or TextMate.

deathaxe avatar Jun 25 '25 16:06 deathaxe

I believe the original issue was created because syntax highlighting is not working in the GitHub interface. GitHub's interface uses linguist which relies on TextMate grammar. Linguist is currently pointing to this repository for it's grammar.

Image

This issue is fixed in Slim 2.0 The referenced Slim 2.0 syntax is a Sublime Text specific syntax definition which does not work with linguist or TextMate.

The repository you linked to fixes the grammar but only for the SublimeText editor which means it does not solve this issue. Am I understanding that correctly or did I miss something?

Jeremy-Walton avatar Jun 25 '25 17:06 Jeremy-Walton

@fredwu Are there plans to bring this repository up to date and active or is it no longer maintained?

Jeremy-Walton avatar Jun 25 '25 17:06 Jeremy-Walton

According to README this repo primarily targets TextMate and Sublime Text, regardless anyone else such as linguist using it. According to the age of last commit and the rather low activity the ST specific fork was created to continue maintanance for ST ecosystem. I wouldn't bed on any progress here.

deathaxe avatar Jun 25 '25 19:06 deathaxe

@Jeremy-Walton I don't believe anyone's actively working on this, I haven't been using Slim or Textmate or Sublime for a few years. Would be happy to hand this project over to someone who's interested in maintaining it.

fredwu avatar Jun 26 '25 06:06 fredwu

I actively use Slim, but do not use Textmate or Sublime, nor do I know much about TextMate grammar. I did find https://github.com/borama/vscode-ruby-slim which has a Textmate compatible grammar so I am attempting to update linguist to use it

Jeremy-Walton avatar Jun 26 '25 16:06 Jeremy-Walton

here's my VSCode extension to help with authoring TextMate grammars https://marketplace.visualstudio.com/items?itemName=RedCMD.tmlanguage-syntax-highlighter

RedCMD avatar Aug 14 '25 05:08 RedCMD

Since this is no longer actively worked on, Linguist replaced its grammar library here https://github.com/github-linguist/linguist/pull/7465 and was released yesterday in https://github.com/github-linguist/linguist/releases/tag/v9.3.0

Seems like this can be closed now.

Jeremy-Walton avatar Sep 19 '25 18:09 Jeremy-Walton