bella icon indicating copy to clipboard operation
bella copied to clipboard

Syntax Highlighting

Open GenericProgrammer1234 opened this issue 2 years ago • 10 comments

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:

  • [x] Visual Studio
  • [ ] Atom/Pulsar/Zed
  • [ ] Vim & Neovim

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.

GenericProgrammer1234 avatar Nov 07 '23 15:11 GenericProgrammer1234

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

MystPi avatar Nov 08 '23 21:11 MystPi

Okay I'll check it out.

GenericProgrammer1234 avatar Nov 09 '23 07:11 GenericProgrammer1234

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

GenericProgrammer1234 avatar Nov 09 '23 07:11 GenericProgrammer1234

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.

MystPi avatar Nov 09 '23 12:11 MystPi

So you are using a different color scheme?

GenericProgrammer1234 avatar Nov 09 '23 13:11 GenericProgrammer1234

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

MystPi avatar Nov 09 '23 19:11 MystPi

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

GenericProgrammer1234 avatar Nov 10 '23 08:11 GenericProgrammer1234

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.

MystPi avatar Nov 10 '23 12:11 MystPi

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

GenericProgrammer1234 avatar Nov 11 '23 10:11 GenericProgrammer1234

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

MystPi avatar Nov 11 '23 12:11 MystPi