atom/apm

better description for `syntax-variables.less`

allefeld opened this issue · 0 comments

Summary

I propose to change the descriptive comment at the beginning of templates/theme/styles/syntax-variables.less:

// This file must be present in every syntax theme. It contains definitions of
// colors intended for specific editor elements. The idea is that these
// definitions are used in the theme itself, but also made available to
// packages that introduce new elements into the editor, so that they can try
// to blend the appearance of these elements into the theme.

Motivation

When I started working on a syntax theme, I was extremely confused as to the purpose of syntax-variables.less. I found that the file must exist, otherwise the theme is not accepted by Atom, but it may be empty, which seems contradictory. The descriptive comment at the beginning of the file

// This defines all syntax variables that syntax themes must implement when they
// include a syntax-variables.less file.

didn't help at all, and is also strictly speaking wrong, because if these variables are not defined in the file, Atom simply falls back to its defaults.

I believe that this change will make it easier for users to get started on developing a syntax theme for Atom.