Chunity
Publisher: jathertonThemes in package: 1
Embeds ChucK in C Sharp for relevant Unity applications. Also includes a theme with the default ChucK syntax highlighting and C Sharp syntax highlighting from the VS "Blue" theme.
Embeds ChucK in C Sharp for relevant Unity applications. Also includes a theme with the default ChucK syntax highlighting and C Sharp syntax highlighting from the VS "Blue" theme.
Full workbench mockup using this variant's colors and tokenColors.
Loading...
Workbench UI color keys from the theme JSON colors map.
TextMate scopes and font styles (syntax highlighting rules).
| scope | foreground | fontStyle |
|---|---|---|
| — | #000000 | — |
| meta.embedded.block.chuck storage, meta.embedded.block.chuck storage.type, meta.embedded.block.chuck constant.special, meta.embedded.block.chuck keyword | #0433ff | — |
| meta.embedded.block.chuck support.class.ugen | #b435f0 | — |
| meta.embedded.block.chuck support.class.event | #95132e | — |
| meta.embedded.block.chuck keyword.operator, meta.embedded.block.chuck support.function.debug | #54291c | — |
| meta.embedded.block.chuck punctuation.definition.string, meta.embedded.block.chuck string.quoted | #515151 | — |
| meta.embedded.block.chuck support.class.io, meta.embedded.block.chuck support.class.library | #95132e | — |
| meta.embedded.block.chuck constant.numeric | #dd9210 | — |
| meta.embedded.block.chuck comment, meta.embedded.block.chuck punctuation.definition.comment | #729e11 | — |
| meta.embedded.block.chuck string.format.chuck.chunity | #db0000 | — |
| meta.embedded.block.chuck entity.name.function, meta.embedded.block.chuck | #54291c | — |
| comment, punctuation.definition.comment | #008000 | — |
| comment.block.preprocessor | #008000 | |
| comment.documentation, comment.block.documentation | #008000 | — |
| invalid.deprecated | — | — |
| invalid.illegal | #660000 | — |
| keyword.operator | #2c4b5e | — |
| keyword, storage | #0000FF | — |
| storage.type, support.type | #2a91af | — |
| constant.language, support.constant, variable.language | #2c4b5e | — |
| variable, support.variable | #2c4b5e | — |
| entity.name.function, support.function | #2c4b5e | |
| entity.name.type.namespace | #2c4b5e | |
| entity.name.type, entity.other.inherited-class, support.class | #2a91af | |
| entity.name.exception | #a31515 | — |
| entity.name.section | — | bold |
| constant.numeric, constant.character, constant | #2c4b5e | — |
| entity.name.variable | #2c4b5e | — |
| string, punctuation.definition.string | #a31515 | — |
| constant.character.escape | #2c4b5e | — |
| string.regexp | #a31515 | — |
| constant.other.symbol | #a31515 | — |
| punctuation | #2c4b5e | — |
| string source, text source | — | — |
| meta.diff.range, meta.diff.index, meta.separator | #434343 | — |
| meta.diff.header.from-file | #434343 | — |
| meta.diff.header.to-file | #434343 | — |
TypeScript sample highlighted with this variant's colors and tokenColors.
Loading...
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}
export interface User {
id: string;
name: string;
role: "admin" | "member";
tags: string[];
}
/**
* Fetch user data by ID
* @param id
* @returns User object or null if ID is invalid
*/
export async function fetchUser(id: string): Promise<User | null> {
if (!id) {
return null;
}
const response = await fetch(`/api/users/${id}`, {
method: "GET",
headers: { Accept: "application/json" },
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}`);
}
return (await response.json()) as User;
}
function greet(user: User): string {
// Simple greeting function that uses the user's name
return `Hello, ${user.name}!`;
}