MystPi / bella

🐶 Bella ⌁ A simple functional programming language ⌁ Written in Gleam!
MIT License
20 stars 3 forks source link

Syntax Highlighting #7

Open GenericProgrammer1234 opened 11 months ago

GenericProgrammer1234 commented 11 months ago

It is hurting to my eyes to look at Bella code without syntax highlighting, now I myself am a programming language hobbyist but the languages I create are easy to look at unlike Bella. I have some experience with Sublime Text syntaxes.

We should at least support these:

Since learning three (or four) different formats takes time, this is a long term thing and I plan for this issue to act as a progress update so it is easy to find what the progress on syntax highlighting has been.

MystPi commented 11 months ago

I have already made a VS Code extension for Bella that enables syntax highlighting.

https://github.com/MystPi/bella-lang-vscode https://marketplace.visualstudio.com/items?itemName=mystpi.bella-lang

GenericProgrammer1234 commented 11 months ago

Okay I'll check it out.

GenericProgrammer1234 commented 11 months ago

In the screenshot, why is and and or not highlighted?

MystPi commented 11 months ago

It depends on the color scheme, but and and or are part of the keyword.operator scope as recommended by TextMate. The default VS Code color scheme does not highlight them any differently from symbol operators.

GenericProgrammer1234 commented 11 months ago

So you are using a different color scheme?

MystPi commented 11 months ago

No, I am using the default color scheme (Dark Modern).

GenericProgrammer1234 commented 11 months ago

So that must mean the default VS Code colour scheme does not highlight symbol operators?

MystPi commented 11 months ago

It just doesn't highlight them any differently from normal operators since they are part of the same TextMate scope. I found this a bit strange at first as well, but it is what TextMate recommends in their documentation.

GenericProgrammer1234 commented 11 months ago

It is weird that normal operators aren't highlighted then, any reason for this?

MystPi commented 11 months ago

It really just depends on the color scheme to highlight them. Some themes (like GitHub dark) highlight operators a different color.