Skip to content

semantic

Semantic highlight tokenmap.

Provides language-specific semantic token color overrides for TypeScript, JavaScript, Python, and Rust. Semantic highlighting runs on top of TextMate syntax tokens and is applied by the language server.

getSemantic(configuration, variant): object

Defined in: semantic.ts:31

Generates semantic token color mappings for the specified theme variant.

These tokens provide higher-fidelity highlighting than standard TextMate grammars by using information from language servers (e.g., distinguishing between a local variable and a built-in library property).

Note: semantic tokens use chromatic palette keys only (e.g. "dark-aqua-500"). They are independent of the neutral prefix and therefore unaffected by temperature or contrast settings.

Configuration

— The theme configuration object.

string

— The theme variant (“dark” or “light”).

object

An object mapping semantic token selectors to hex color strings.

class:python: any

class:typescript: any

class:typescriptreact: any

enum:typescript: any

enum:typescriptreact: any

enumMember:typescript: any

enumMember:typescriptreact: any

interface:typescript: any

interface:typescriptreact: any

intrinsic:python: any

macro:rust: any

memberOperatorOverload: any

module:python: any

namespace:rust: any

namespace:typescript: any

namespace:typescriptreact: any

operatorOverload: any

property.defaultLibrary:javascript: any

property.defaultLibrary:javascriptreact: any

property.defaultLibrary:typescript: any

property.defaultLibrary:typescriptreact: any

selfKeyword:rust: any

variable.defaultLibrary:javascript: any

variable.defaultLibrary:javascriptreact: any

variable.defaultLibrary:typescript: any

variable.defaultLibrary:typescriptreact: any