Sublime Forum

Looking for a developer for a syntax highlighter

#1

I’m looking for someone who can create a syntax highlighting configuration for me (for a small payment).

I would like to have the following:

  • Basis is a JSON syntax with an addition of C-style comments, as follows:
    • line comments with: // ...
    • multiline comments with /* .. */
  • JSON strings can contain a script language. I need support for the highlighting of functions, variables and numbers within the strings. Functions are found within <% %> (in most cases). Some examples of strings:
    • "<% func1( @var1, func2( @var2)) %>
    • "<% func1( func2( @var2)) %> <% func3( @var1, func4( @var2)) %>"
    • "<% func1( func2(1, 2, 3, 'string'), @var) %>"
    • "<% @var1 %>"
    • "<% @var1 + @var2 %>"
    • "<% @var1 + @var2 %>"
    • "<% @var1 + 'string\\t' %>"
    • All variables start with @.
    • All strings in functions start with a single quote.
    • String can contain escapes with \\n. Second “” is needed because of correct JSON string notation.
  • <% and %> should have a different color.

The idea is to give each function/variable a new color/shade when it is ‘nested’. For example:

<% color1( color2(@color3), @color2, color2() ) %>`

Functions are for example green and the deeper they are nested the darker they become.

Who can be of any help :slightly_smiling:?

0 Likes

#2

Should the color scheme be user-selectable or can colors be hard-coded? I’m asking because nesting (and theoretically different coloring of opening and closing punctuation) would require a specifically crafted color scheme which doesn’t allow for user preferences. A dark and bright scheme could be provided together with the syntax definition.

We could discuss details via private message or email.

Edit: The job is done. Pleasuring client.

0 Likes

#3

Hardcoded, but editable colors would work. The important thing is readability of nested function & variables.

PS. I cannot find the PM option. Can you PM me?

0 Likes