Add Zig to REPL

Describe your feature request
Adding Zig (https://ziglang.org/) to REPL’s usable languages
What problem(s) would this feature solve?
Well it would allow more exposure to the lesser known but just as useful languages out there, it will give users a new language to try out that isn’t among the “big ones.”
Explain what you were trying to do when you came across the problem leading to this feature request
Well there was not an issue of course, but from my own personal frustration and after discussing people who saw the same difficulty and annoyance that they cannot code in ZIG on any online IDE except for github codespaces or gitpod (when configured properly which frankly majority of us can’t even do easily). this will also allow people to be exposed to a more unique language, of course.

4 Likes

Replit uses nixpkgs and I think there is a zig package, so you can make a template yourself.

2 Likes

Debugger and language server, but no syntax highlighting:
https://replit.com/@UMARismyname/Zig

5 Likes

syntax highlighting = nice

1 Like

yeah, that would be the feature request / maybe it’s possible with extensions

1 Like

I believe there was a request to add custom syntax highlighting for your files.

2 Likes

This exists!:
https://replit.com/@PotentialStyx/Zig?v=1
I don’t think that there’s syntax highlighting sadly tho

2 Likes
5 Likes

Nice, thanks! If you build with release-safe, you’ll see there’s a memory leak somewhere. :slight_smile:

1 Like

Don’t worry guys I’m working on a bounty to implement zig syntax highlighting for replit :wink:
https://replit.com/bounties/@masfrost/zig-language-mode-fo
It’s going to include block folding too :heart:
Though I can’t guarantee it’ll be 100% identical to vscode and sublime because lezer grammars are an extreme pain and sometimes undocumented mess.

5 Likes

Is there any update on this? Let me know if I can help!

1 Like

Do you have a link to your repo/Replit that you’re working in? I couldn’t find anything online:

1 Like

@Nezteb it could be a private Repl that they are working in. In that case you can’t find their Repl. CSharpIsGud probably hasn’t finished (it takes a lot of time to make extensions) yet so don’t rush them.

1 Like

Ah my intention was not to rush but instead to offer support/help if @CSharpIsGud wanted it! :smile:

1 Like

@Nezteb Im not trying to be rude, but in what way were you helping? The links you gave are just searches that didn’t work. You asked for a Repl that they were working in. It’s currently in progress says the bounty, so it shouldn’t be much longer.

1 Like

Yeah it’s been in progress for a few months but since then there have been many complications. I might end up giving it up.
Lezer is barely documented and has so much trouble with things other parser generators have no problem with. If you run into a problem you are very likely to be completely on your own without anything on google to help.
Every single time you make progress you get set back with shift/reduce conflicts or something like that which you have to go back and refine rules you’ve already written to fix (assuming you can even tell which ones are the problem)
On top of all that if you have a potato it takes over a minute to test every change.
What I currently have cannot even be tested in a normal repl because lezer takes too much memory than what a free repl can provide.

3 Likes

No worries! It’s a lot of work.

I’d like to try to help as well, but I am not a parser expert. I did ask in the Zig Discord about this though, so maybe others would be interested in helping.

2 Likes

replit/nixmodules#140 :eyes:

4 Likes