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

Language Coloring in Code Editor #662

arcanecode opened this issue Aug 15, 2019 · 3 comments


Copy link

commented Aug 15, 2019

I've noticed that the code editor tends to look like poo when you have it in a theme. Even out of a theme some languages don't resemble what they do in their native editor.

I looked through the code, seems like you are taking each language and creating variables holding language elements you can use for a regex expression to determine if something is a variable, command, etc.

What I haven't been able to hunt down yet is where color coding occurs, nor am I sure if color coding is generic or language specific.

I'd be glad to help out if it does wind up being language specific, for example opening a PowerShell script in VSCode and see what colors it uses then providing a JSON or similar type file with the definitions you'd need.

Perhaps we need a theme specific for the code editor, something we can predict will render syntax well, while at the same time making other types of notes look decent.

Any guidance you can provide on the best way to help out would be great. Thanks.


This comment has been minimized.

Copy link

commented Aug 19, 2019

Can you share some screenshots of how it looks for you?


This comment has been minimized.

Copy link

commented Aug 21, 2019

Sure. This first example shows some PowerShell code in the Futura theme.
PowerShell Code in StandardNotes

I basically get two colors, plain gray and in this case orange, but for other themes it uses the primary color for that theme. For example, the Midnight theme has blue where Futura is orange.

Now contrast that with the look in VSCode:

PowerShell Code in VSCode

As you can see, VSCode is much more colorful and thus easier to distinguish variables (light blue) from static text (orange-ish) from cmdlets (yellow) from comments (dark green).

It'd be nice to get similar color coding in Standard Notes, and like I said if we can come up with a good method I'd be glad to work on supplying some color codes for some of the languages I know. Perhaps a JSON file or some similar mechanism?

Thanks again for a great product!


This comment has been minimized.

Copy link

commented Aug 22, 2019

We use CodeMirror as the underlying editor. So not much control we have over this. We're looking to Monaco in the future, which is the underlying editor VSCode uses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.