Sublime Forum

Syntax custom coloring - why do i need to write new color scheme file when i make my syntax

#1

i’ve made a syntax and custom coloring for my logs from my dev work
the problem i found is that i made my custom scopes thet don’t exist in any color scheme - because i made syntax for logs, not code

is there a better way then what i did (below) ?
i took monokai color scheme and copied only the header so that i have all the scheme colores but no rules for code scopes like any code syntax uses
and i put only the rules for my logs syntax.
now when i set my logs synax, i switch into my LogsMonokai color scheme

this obviously leaves me with need for manual update whenever Monokai updates (which is quite rare but still)
i’d love to have an option to just make an extension for color definitions file

0 Likes

#2

You probably want to use scopes present on http://www.sublimetext.com/docs/3/scope_naming.html, otherwise you are likely to have scopes that color schemes won’t have colors for.

Perhaps check out some of the markup scopes since they are for text, as opposed to code.

3 Likes

How To: syntax highlighting & custom scopes