vlang / vlang/website

Syntax highlighting

Open
#246 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
67
Forks
101
PR merge metrics
No merged PRs in 30d

Description

Description

Only very few people are coding without syntax highlighting, and imo it greatly improves readability.
I'd suggest that the example code on your website gets syntax highlighting.

Current state:
image

Good

I'm coming from the Kotlin world, so I'd like colors like these:
image

Features: keywords (orange), declared function names (yellow), struct members (lavender), strings (green), comments (slightly different green) and numbers (light blue) have different colors.

For libraries, popular ones like highlight.js or prism.js should work fine.

Bad

Please don't use the colors that Zig uses. I think that keywords shouldn't be more prominent than regular text, because they contain similar or less information than function calls and expressions. Zig somehow decided that bold and bright is appropriate for them 🤦‍♂️. Also the text in Zig's preview has not enough contrast to the background in my opinion.
image

Contribution?

I may be able to implement that, but I'll have to see how your project is structured, and how to integrate new JavaScript libraries first.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the website entry point that renders the example code and review how its HTML is structured. Compare highlight.js and prism.js for V support, then confirm that keywords, function names, members, strings, comments, and numbers have distinct, readable colors with sufficient contrast.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.