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

Syntax highlighting for Arturo #1286

Open
BNAndras opened this issue Oct 24, 2023 · 4 comments
Open

Syntax highlighting for Arturo #1286

BNAndras opened this issue Oct 24, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request stale

Comments

@BNAndras
Copy link

Is your feature request related to a problem? Please describe.
At the moment, there’s no syntax highlighting specifically for Arturo. The syntax highlighting in the repo readme uses the grammar definition for red. At the moment this is fine, but I imagine the two languages might drift over time so an Arturo-specific grammar can be tweaked more closely to the language.

Describe alternatives you've considered
We could just keep the red grammar rule.

@BNAndras BNAndras added the enhancement New feature or request label Oct 24, 2023
@drkameleon
Copy link
Collaborator

drkameleon commented Oct 24, 2023

You absolutely have a point.

As a matter of fact, all things taken into account (attributes, quantities, etc), the two languages (or better said the 3 of them) have already drifted apart.

Now, trust me I'd love that. And I have absolutely "studied" the issue.

In a few words:

if we are talking about highlighting in general, we have the VSCode extension, the awesome Pygments plugin by @RickBarretto, the Prism extension, even one for Ace Editor. So, we're definitely not short of highlighters lol (but I guess you know that).

Now, for that to work in GitHub, "all" we have to do is make a PR at: https://github.com/github-linguist/linguist (actually it's the official language recognizer by GitHub itself)

I say "all" but in fact this can be very challenging. Why? Because there have some very, very strict criteria about which languages they accept: https://github.com/github-linguist/linguist/blob/master/CONTRIBUTING.md#adding-an-extension-to-a-language

But... ⚠️ apparently, I'm seeing that perhaps they have relaxed their prerequisites as of lately (?!): github-linguist/linguist#5756

So... after all, perhaps it's time we good attempt something wild and finally submit arturo for some official highlighting support? Hmm.... 🤔

That's some idea!!

@BNAndras
Copy link
Author

Thanks for the information. In particular, I was thinking about highlightjs support since Discord uses that library. Adding an Arturo grammar there could be of use in highlighting code snippets for the Arturo Discord channel down the road.

@drkameleon
Copy link
Collaborator

Good idea, but... have a look:

highlightjs/highlight.js#3196

(You can obviously use all the work that I had done there and make something more interesting. I honestly don't remember much, but feel free to shoot me with any idea! 😉 )

Copy link

stale bot commented Jun 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants