This commit is contained in:
Nate Butler 2023-02-26 13:24:41 -05:00
parent 098e6969f7
commit 161373710c

View File

@ -109,28 +109,103 @@ export interface SyntaxHighlightStyle {
}
export interface Syntax {
// == Text Styles
primary: SyntaxHighlightStyle
"variable.special": SyntaxHighlightStyle
predictive: SyntaxHighlightStyle
emphasis: SyntaxHighlightStyle
"emphasis.strong": SyntaxHighlightStyle
title: SyntaxHighlightStyle
linkUri: SyntaxHighlightStyle
linkText: SyntaxHighlightStyle
// == General
comment: SyntaxHighlightStyle
// == Punctuation
punctuation: SyntaxHighlightStyle
/** (, [, {...*/
"punctuation.bracket": SyntaxHighlightStyle,
// ., ;
"punctuation.delimiter": SyntaxHighlightStyle,
// js, ts: ${, } in a template literal
// yaml: *, &, ---, ...
"punctuation.special": SyntaxHighlightStyle,
// md: list_marker_plus, list_marker_dot, etc
"punctuation.list_marker": SyntaxHighlightStyle
// this, ...
// css: -- (var(--foo))
// lua: self
"variable.special": SyntaxHighlightStyle
// true, false, null, nullptr
constant: SyntaxHighlightStyle
// css: @media, @import, @supports...
// js: declare, implements, interface, keyof, public...
keyword: SyntaxHighlightStyle
function: SyntaxHighlightStyle
type: SyntaxHighlightStyle
constructor: SyntaxHighlightStyle
variant: SyntaxHighlightStyle
// css: class_name, property_name, namespace_name...
property: SyntaxHighlightStyle
// note: js enum is currently defined as a keyword
enum: SyntaxHighlightStyle
// -, --, ->, !=, &&, ||, <=...
operator: SyntaxHighlightStyle
string: SyntaxHighlightStyle
number: SyntaxHighlightStyle
boolean: SyntaxHighlightStyle
predictive: SyntaxHighlightStyle
title: SyntaxHighlightStyle
emphasis: SyntaxHighlightStyle
"emphasis.strong": SyntaxHighlightStyle
linkUri: SyntaxHighlightStyle
linkText: SyntaxHighlightStyle
// c: statement_identifier,
label: SyntaxHighlightStyle,
// css: tag_name, nesting_selector, universal_selector...
tag: SyntaxHighlightStyle,
// css: attribute, pseudo_element_selector (tag_name),
attribute: SyntaxHighlightStyle,
// css: color_value
// js: this, super
// racket: regex
// toml: offset_date_time, local_date_time...
"string.special": SyntaxHighlightStyle,
// elixir: atom, quoted_atom, keyword, quoted_keyword
// ruby: simple_symbol, delimited_symbol...
"string.special.symbol": SyntaxHighlightStyle
// ruby: Regular expression
"string.special.regex": SyntaxHighlightStyle
// elixir, python, yaml...: escape_sequence
"string.escape": SyntaxHighlightStyle,
// Regular expressions
"string.regex": SyntaxHighlightStyle,
// elixir: doc comment
"comment.doc": SyntaxHighlightStyle,
// js: predefined_type
"type.builtin": SyntaxHighlightStyle,
// elixir, python: interpolation (ex: foo in ${foo})
// js: template_substitution
embedded: SyntaxHighlightStyle,
// elixir: __MODULE__, __DIR__, __ENV__, etc
// go: nil, iota
"constant.builtin": SyntaxHighlightStyle,
// go: call_expression, method_declaration
// js: call_expression, method_definition, pair (key, arrow function)
"function.method": SyntaxHighlightStyle,
// ruby: identifier/"defined?" // Nate note: I don't fully understand this one.
"function.method.builtin": SyntaxHighlightStyle
// lua: function_call
"function.call": SyntaxHighlightStyle
// lua: assert, error, loadfile, tostring, unpack...
"function.builtin": SyntaxHighlightStyle
// lua: hash_bang_line
preproc: SyntaxHighlightStyle
// md: indented_code_block, fenced_code_block, code_span
"text.literal": SyntaxHighlightStyle
// racket: lang_name
"variable.builtin": SyntaxHighlightStyle
// rust: function_item name: (identifier)
"function.definition": SyntaxHighlightStyle
// rust: macro_definition name: (identifier)
"function.special.definition": SyntaxHighlightStyle
}
// HACK: "constructor" as a key in the syntax interface returns an error when a theme tries to use it.