mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
WIP
This commit is contained in:
parent
098e6969f7
commit
161373710c
1 changed files with 82 additions and 7 deletions
|
@ -109,28 +109,103 @@ export interface SyntaxHighlightStyle {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Syntax {
|
export interface Syntax {
|
||||||
|
// == Text Styles
|
||||||
primary: SyntaxHighlightStyle
|
primary: SyntaxHighlightStyle
|
||||||
"variable.special": SyntaxHighlightStyle
|
predictive: SyntaxHighlightStyle
|
||||||
|
emphasis: SyntaxHighlightStyle
|
||||||
|
"emphasis.strong": SyntaxHighlightStyle
|
||||||
|
title: SyntaxHighlightStyle
|
||||||
|
linkUri: SyntaxHighlightStyle
|
||||||
|
linkText: SyntaxHighlightStyle
|
||||||
|
|
||||||
|
// == General
|
||||||
comment: SyntaxHighlightStyle
|
comment: SyntaxHighlightStyle
|
||||||
|
|
||||||
|
// == Punctuation
|
||||||
punctuation: SyntaxHighlightStyle
|
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
|
constant: SyntaxHighlightStyle
|
||||||
|
// css: @media, @import, @supports...
|
||||||
|
// js: declare, implements, interface, keyof, public...
|
||||||
keyword: SyntaxHighlightStyle
|
keyword: SyntaxHighlightStyle
|
||||||
function: SyntaxHighlightStyle
|
function: SyntaxHighlightStyle
|
||||||
type: SyntaxHighlightStyle
|
type: SyntaxHighlightStyle
|
||||||
constructor: SyntaxHighlightStyle
|
constructor: SyntaxHighlightStyle
|
||||||
variant: SyntaxHighlightStyle
|
variant: SyntaxHighlightStyle
|
||||||
|
// css: class_name, property_name, namespace_name...
|
||||||
property: SyntaxHighlightStyle
|
property: SyntaxHighlightStyle
|
||||||
|
// note: js enum is currently defined as a keyword
|
||||||
enum: SyntaxHighlightStyle
|
enum: SyntaxHighlightStyle
|
||||||
|
// -, --, ->, !=, &&, ||, <=...
|
||||||
operator: SyntaxHighlightStyle
|
operator: SyntaxHighlightStyle
|
||||||
string: SyntaxHighlightStyle
|
string: SyntaxHighlightStyle
|
||||||
number: SyntaxHighlightStyle
|
number: SyntaxHighlightStyle
|
||||||
boolean: SyntaxHighlightStyle
|
boolean: SyntaxHighlightStyle
|
||||||
predictive: SyntaxHighlightStyle
|
|
||||||
title: SyntaxHighlightStyle
|
// c: statement_identifier,
|
||||||
emphasis: SyntaxHighlightStyle
|
label: SyntaxHighlightStyle,
|
||||||
"emphasis.strong": SyntaxHighlightStyle
|
// css: tag_name, nesting_selector, universal_selector...
|
||||||
linkUri: SyntaxHighlightStyle
|
tag: SyntaxHighlightStyle,
|
||||||
linkText: 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.
|
// HACK: "constructor" as a key in the syntax interface returns an error when a theme tries to use it.
|
||||||
|
|
Loading…
Reference in a new issue