Skip to content

Syntax Highlighting Improvements #1

@stekyne

Description

@stekyne

Thought it might be useful to put down the ideas we'd like for the syntax highlighting. I've been looking at the docs a lot more but haven't really added much in terms of features yet.

The direct translation of Nate's grammar files has been a great help but the look is not translating 100%. I would also like to change some things from a taste point of view. That's my main reason for starting this discussion.

https://user-images.githubusercontent.com/14102861/28718447-0bafd418-7374-11e7-9848-3eef56a213fb.png

The image above shows the Atom version. Some things I'd like to see different.

  1. The high-level document sections (eg. CsOptions, CsInstruments) have the same colour as variables which have the same colours as opcodes and opcode arguments. I don't think this is a good use of colour(s) and doesn't make it more readable.

  2. The variables (i, a, k etc) highlight the start character only and all have the same colour. This is a taste thing I guess but it can be hard to see the highlight when it's only character wide. I think I'd prefer the whole token to get highlighted to make it clearer. Also, maybe have different colours based on what type of signal/rate the variable is. This could mean too much colour(s)/visual noise though so I guess there would need to be a balance. I definitely see a benefit to contrasting i, a and k-rates though.

  3. Instr keyword (I think other keywords as well) and operator colouring are the same, should be different.

Any ideas/comments? I'm going to experiment with the above 3 things and make a prototype to see how it looks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions