rusted
Publisher: sph1nxisThemes in package: 1
A dark VS Code theme inspired by the color palette of The Rust Programming Language code snippets and rusty.nvim
A dark VS Code theme inspired by the color palette of The Rust Programming Language code snippets and rusty.nvim
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 |
|---|---|---|
| comment, punctuation.definition.comment | #969896 | — |
| string, string.quoted, string.template, punctuation.definition.string | #B5BD68 | — |
| constant.numeric | #F0C674 | — |
| constant.language, constant.language.boolean, constant.language.null, constant.language.undefined, constant.language.nil, constant.language.none | #DE935F | — |
| constant.character.escape | #F0C674 | — |
| string.regexp | #FF9DA4 | — |
| keyword, keyword.control, keyword.operator | #B294BB | — |
| storage, storage.type, storage.modifier | #B294BB | — |
| variable, variable.other, support.variable | #C5C8C6 | — |
| entity.name.function, support.function, meta.function-call, variable.function | #8ABEB7 | — |
| entity.name.type, support.type, support.class, meta.type.identifier, meta.return.type, entity.other.inherited-class | #DE935F | — |
| punctuation, meta.brace, meta.delimiter, punctuation.terminator, punctuation.separator, punctuation.accessor | #C5C8C6 | — |
| entity.name.function.decorator, meta.decorator, meta.annotation, punctuation.definition.decorator, storage.type.annotation | #F0C674 | — |
| variable.language.self, variable.language.this, variable.language.super | #B294BB | — |
| variable.parameter, meta.parameter | #81A2BE | — |
| variable.other.property, variable.object.property, meta.object-literal.key, support.variable.property | #81A2BE | — |
| entity.name.namespace, entity.name.module, entity.name.package, support.module | #81A2BE | — |
| keyword.control.import, keyword.control.export, entity.name.import, meta.import | #81A2BE | — |
| entity.name.tag, meta.tag, punctuation.definition.tag | #81A2BE | — |
| entity.other.attribute-name | #F0C674 | — |
| support.type.property-name | #81A2BE | — |
| support.constant.property-value | #DE935F | — |
| entity.other.attribute-name.class, entity.other.attribute-name.id, entity.other.attribute-name.pseudo-class, entity.other.attribute-name.pseudo-element | #B5BD68 | — |
| markup.inserted, punctuation.definition.inserted | #B5BD68 | — |
| markup.deleted, punctuation.definition.deleted | #CC6666 | — |
| markup.changed, punctuation.definition.changed | #F0C674 | — |
| meta.diff.header, punctuation.definition.diff.header | #81A2BE | — |
| meta.embedded, source.embedded, punctuation.section.embedded | #C5C8C6 | — |
| keyword.other.if.cmake, keyword.other.else.cmake, keyword.other.elseif.cmake, keyword.other.endif.cmake, keyword.other.foreach.cmake, keyword.other.endforeach.cmake, keyword.other.while.cmake, keyword.other.endwhile.cmake, keyword.other.function.cmake, keyword.other.endfunction.cmake, keyword.other.macro.cmake, keyword.other.endmacro.cmake, keyword.other.set.cmake, keyword.other.unset.cmake, keyword.other.list.cmake, keyword.other.file.cmake, keyword.other.add_executable.cmake, keyword.other.add_library.cmake, keyword.other.target_link_libraries.cmake, keyword.other.target_include_directories.cmake, keyword.other.find_package.cmake, keyword.other.message.cmake, keyword.other.option.cmake, keyword.other.project.cmake, keyword.other.cmake_minimum_required.cmake, keyword.other.install.cmake | #B294BB | — |
| variable.other.cmake, meta.variable.cmake, punctuation.definition.variable.cmake | #81A2BE | — |
| support.constant.generator.cmake | #DE935F | — |
| string.quoted.triple.dart | #B5BD68 | — |
| entity.name.type.mixin.dart, entity.name.type.extension.dart, support.class.widget.dart, support.class.flutter.dart | #DE935F | — |
| entity.name.function.constructor.dart | #8ABEB7 | — |
| keyword.other.part.dart, keyword.other.library.dart, keyword.other.mixin.dart, keyword.other.factory.dart, keyword.other.operator.dart, keyword.other.get.dart, keyword.other.set.dart, keyword.other.dynamic.dart, keyword.other.Never.dart, keyword.other.Future.dart, keyword.other.Stream.dart, keyword.other.rethrow.dart, keyword.other.assert.dart | #B294BB | — |
| keyword.other.abstract.dart, keyword.other.sealed.dart, keyword.other.base.dart, keyword.other.interface.dart, keyword.other.final.dart, keyword.other.required.dart, keyword.other.late.dart, keyword.other.const.dart, keyword.other.static.dart, keyword.other.covariant.dart | #B294BB | — |
| keyword.other.async.dart, keyword.other.await.dart, keyword.other.yield.dart, keyword.other.sync.dart | #B294BB | — |
| variable.language.this.dart, variable.language.super.dart, keyword.other.this.dart, keyword.other.super.dart | #B294BB | — |
| variable.other.enummember.dart | #B5BD68 | — |
| keyword.other.from.dockerfile, keyword.other.run.dockerfile, keyword.other.cmd.dockerfile, keyword.other.label.dockerfile, keyword.other.expose.dockerfile, keyword.other.env.dockerfile, keyword.other.add.dockerfile, keyword.other.copy.dockerfile, keyword.other.entrypoint.dockerfile, keyword.other.volume.dockerfile, keyword.other.user.dockerfile, keyword.other.workdir.dockerfile, keyword.other.arg.dockerfile, keyword.other.onbuild.dockerfile, keyword.other.stopsignal.dockerfile, keyword.other.healthcheck.dockerfile, keyword.other.shell.dockerfile | #B294BB | — |
| punctuation.definition.variable.dockerfile | #8ABEB7 | — |
| string.quoted.raw.go | #B5BD68 | — |
| entity.name.type.interface.go, storage.type.interface.go, entity.name.type.exported.go, storage.type.bool.go, storage.type.string.go, storage.type.int.go, storage.type.float.go, storage.type.byte.go, storage.type.rune.go, storage.type.error.go, storage.type.complex.go | #DE935F | — |
| entity.name.function.exported.go, entity.name.function.new.go | #8ABEB7 | — |
| keyword.control.defer.go, keyword.control.panic.go, keyword.control.recover.go, keyword.control.goroutine.go, keyword.control.select.go, keyword.other.channel.go, keyword.other.iota.go, keyword.other.fallthrough.go, keyword.other.range.go | #B294BB | — |
| keyword.other.make.go, keyword.other.new.go, keyword.other.len.go, keyword.other.cap.go, keyword.other.append.go, keyword.other.copy.go, keyword.other.close.go, keyword.other.delete.go | #8ABEB7 | — |
| entity.name.variable.exported.go, entity.name.constant.exported.go | #DE935F | — |
| storage.modifier.exported.go, storage.modifier.unexported.go | #B294BB | — |
| constant.numeric.hex.go, constant.numeric.octal.go, constant.numeric.complex.go | #F0C674 | — |
| entity.name.tag.type.haskell, support.constructor.haskell, punctuation.definition.type.haskell, punctuation.context.haskell | #DE935F | — |
| entity.name.function.infix.haskell, support.function.prelude.haskell | #8ABEB7 | — |
| keyword.other.module.haskell, keyword.other.qualified.haskell, keyword.other.data.haskell, keyword.other.newtype.haskell, keyword.other.class.haskell, keyword.other.instance.haskell, keyword.other.deriving.haskell, keyword.other.infixl.haskell, keyword.other.infixr.haskell, keyword.other.infix.haskell, keyword.other.family.haskell, keyword.other.role.haskell, keyword.other.pattern.haskell, keyword.other.stock.haskell, keyword.other.anyclass.haskell, keyword.other.via.haskell | #B294BB | — |
| punctuation.arrow.haskell | #B294BB | — |
| support.constant.prelude.haskell | #DE935F | — |
| variable.other.enummember.haskell | #B5BD68 | — |
| entity.name.section.ini, entity.name.section.properties, keyword.other.section.ini, punctuation.definition.section.ini, meta.section.ini | #B294BB | — |
| entity.name.key.ini, entity.name.key.properties, keyword.other.key.ini, punctuation.definition.key.ini | #81A2BE | — |
| punctuation.separator.key-value.ini | #C5C8C6 | — |
| comment.line.ini | #969896 | — |
| string.quoted.triple.java | #B5BD68 | — |
| entity.name.type.class.java, entity.name.type.interface.java, entity.name.type.enum.java, entity.name.type.record.java, storage.type.primitive.java | #DE935F | — |
| entity.name.function.constructor.java, meta.method.java | #8ABEB7 | — |
| keyword.other.package.java, keyword.other.throws.java, keyword.other.synchronized.java, keyword.other.volatile.java, keyword.other.transient.java, keyword.other.native.java, keyword.other.strictfp.java, keyword.other.default.java, keyword.other.sealed.java, keyword.other.permits.java, keyword.other.non-sealed.java, keyword.other.instanceof.java | #B294BB | — |
| storage.type.annotation.java, entity.name.type.annotation.java, punctuation.definition.annotation.java | #F0C674 | — |
| constant.other.enum.java | #B5BD68 | — |
| comment.block.javadoc keyword, comment.block.javadoc storage.type, comment.block.javadoc punctuation.definition.block.tag, comment.block.javadoc variable.parameter, comment.block.javadoc entity.name.type | #B294BB | — |
| variable.language.this.java, variable.language.super.java, keyword.other.this.java, keyword.other.super.java | #B294BB | — |
| string.quoted.triple.kotlin | #B5BD68 | — |
| entity.name.type.object.kotlin, entity.name.type.data.kotlin, entity.name.type.sealed.kotlin, entity.name.type.enum.kotlin | #DE935F | — |
| support.function.scope.kotlin, support.function.extension.kotlin, meta.function.kotlin | #8ABEB7 | — |
| keyword.other.suspend.kotlin, keyword.other.inline.kotlin, keyword.other.operator.kotlin, keyword.other.infix.kotlin, keyword.other.tailrec.kotlin, keyword.other.external.kotlin, keyword.other.lateinit.kotlin, keyword.other.by.kotlin, keyword.other.when.kotlin, keyword.other.object.kotlin, keyword.other.companion.kotlin, keyword.other.init.kotlin, keyword.other.data.kotlin, keyword.other.sealed.kotlin, keyword.other.open.kotlin, keyword.other.override.kotlin | #B294BB | — |
| variable.other.property.declaration.kotlin | #81A2BE | — |
| meta.annotation.kotlin, entity.name.type.annotation.kotlin | #F0C674 | — |
| constant.other.enum.kotlin | #B5BD68 | — |
| support.function.latex, support.function.be.latex, keyword.control.latex, keyword.control.documentclass.latex, keyword.control.usepackage.latex, keyword.control.include.latex, keyword.control.input.latex, keyword.control.newcommand.latex, keyword.control.renewcommand.latex, keyword.control.providecommand.latex, keyword.control.declaremathoperator.latex, keyword.control.newenvironment.latex, keyword.control.renewenvironment.latex, keyword.control.def.latex | #8ABEB7 | — |
| keyword.control.begin.latex, keyword.control.end.latex, meta.environment.latex, meta.function.environment.latex, punctuation.definition.environment.latex | #B294BB | — |
| meta.math.latex, support.function.math.latex, punctuation.definition.math.latex | #B5BD68 | — |
| support.variable.label.latex, support.variable.cite.latex, support.variable.ref.latex | #F0C674 | — |
| meta.group.brace.latex, punctuation.definition.group.latex, punctuation.definition.arguments.latex | #C5C8C6 | — |
| meta.document.latex, meta.preamble.latex, meta.include.latex | #C5C8C6 | — |
| string.quoted.long.lua | #B5BD68 | — |
| meta.table.lua, punctuation.separator.table.lua | #C5C8C6 | — |
| keyword.control.repeat.lua, keyword.control.until.lua, keyword.control.local.lua, keyword.control.goto.lua, keyword.control.nil.lua | #B294BB | — |
| variable.language.self.lua | #B294BB | — |
| entity.name.function.target.makefile, meta.target.makefile, punctuation.definition.target.makefile | #8ABEB7 | — |
| variable.other.makefile, meta.variable.makefile, punctuation.definition.variable.makefile | #81A2BE | — |
| keyword.other.ifdef.makefile, keyword.other.ifndef.makefile, keyword.other.ifeq.makefile, keyword.other.ifneq.makefile, keyword.other.include.makefile, keyword.other.export.makefile, keyword.other.unexport.makefile, keyword.other.override.makefile, keyword.other.define.makefile, keyword.other.endef.makefile, keyword.other.vpath.makefile | #B294BB | — |
| meta.scope.prerequisites.makefile, meta.target.prerequisites.makefile | #C5C8C6 | — |
| variable.language.automatic.makefile | #DE935F | — |
| support.function.makefile | #8ABEB7 | — |
| string.quoted.heredoc.php, string.quoted.nowdoc.php, meta.heredoc.php, meta.nowdoc.php | #B5BD68 | — |
| variable.other.php, meta.variable.php | #C5C8C6 | — |
| entity.name.type.trait.php, entity.name.type.enum.php | #DE935F | — |
| entity.name.function.construct.php, entity.name.function.destruct.php, support.function.array.php, support.function.string.php, support.function.mysql.php | #8ABEB7 | — |
| keyword.other.namespace.php, keyword.other.use.php, keyword.other.trait.php, keyword.other.match.php, keyword.other.yield.php, keyword.other.fn.php, keyword.other.echo.php, keyword.other.print.php, keyword.other.require.php, keyword.other.include.php, keyword.other.list.php, keyword.other.isset.php, keyword.other.empty.php, keyword.other.unset.php, keyword.other.die.php, keyword.other.exit.php, keyword.other.global.php | #B294BB | — |
| keyword.other.abstract.php, keyword.other.final.php, keyword.other.static.php, keyword.other.public.php, keyword.other.private.php, keyword.other.protected.php, keyword.other.readonly.php, keyword.other.const.php, keyword.other.var.php | #B294BB | — |
| variable.language.this.php, variable.language.self.php, variable.language.static.php | #B294BB | — |
| meta.array.php, punctuation.definition.array.php | #C5C8C6 | — |
| constant.other.enum.php | #B5BD68 | — |
| meta.decorator.php, entity.name.type.annotation.php | #F0C674 | — |
| keyword.other.syntax.proto, keyword.other.package.proto, keyword.other.import.proto, keyword.other.option.proto, keyword.other.message.proto, keyword.other.enum.proto, keyword.other.service.proto, keyword.other.rpc.proto, keyword.other.returns.proto, keyword.other.stream.proto, keyword.other.repeated.proto, keyword.other.optional.proto, keyword.other.required.proto, keyword.other.oneof.proto, keyword.other.map.proto, keyword.other.reserved.proto, keyword.other.extensions.proto, keyword.other.extend.proto, keyword.other.public.proto, keyword.other.weak.proto, keyword.other.group.proto | #B294BB | — |
| entity.name.type.message.proto, entity.name.type.enum.proto, entity.name.type.service.proto, support.type.proto | #DE935F | — |
| entity.name.field.proto | #81A2BE | — |
| string.regexp.group, string.regexp.named-group, string.regexp.non-capturing-group, punctuation.definition.group.regexp | #B294BB | — |
| string.regexp.character-class, string.regexp.character-class.range, string.regexp.character-class.set, punctuation.definition.character-class.regexp | #FF9DA4 | — |
| string.regexp.quantifier, keyword.control.quantifier.regexp, keyword.control.quantifier.greedy, keyword.control.quantifier.lazy, keyword.control.quantifier.possessive | #8ABEB7 | — |
| string.regexp.anchor, keyword.control.anchor.regexp, keyword.control.anchor.start, keyword.control.anchor.end, keyword.control.anchor.word-boundary | #F0C674 | — |
| string.regexp.lookahead, string.regexp.lookbehind | #DE935F | — |
| string.regexp.backreference | #DE935F | — |
| string.regexp.modifier | #81A2BE | — |
| string.quoted.heredoc.ruby, punctuation.definition.string.heredoc.ruby | #B5BD68 | — |
| constant.other.symbol.ruby, constant.other.symbol.hashkey.ruby, punctuation.definition.symbol.ruby | #8ABEB7 | — |
| variable.other.constant.ruby, variable.other.block.ruby | #C5C8C6 | — |
| keyword.control.unless.ruby, keyword.control.until.ruby, keyword.control.rescue.ruby, keyword.control.ensure.ruby, keyword.control.retry.ruby, keyword.control.redo.ruby, keyword.other.defined.ruby, keyword.other.undef.ruby, keyword.other.alias.ruby, keyword.other.BEGIN.ruby, keyword.other.END.ruby | #B294BB | — |
| entity.name.function.initialize.ruby | #8ABEB7 | — |
| meta.block.ruby, punctuation.section.function.ruby | #C5C8C6 | — |
| meta.embedded.line.ruby, punctuation.section.embedded.ruby | #C5C8C6 | — |
| string.quoted.multiline.swift, string.quoted.triple.swift | #B5BD68 | — |
| meta.interpolation.swift, punctuation.section.interpolation.swift | #F0C674 | — |
| entity.name.type.protocol.swift, storage.type.protocol.swift, entity.name.type.extension.swift, meta.type.swift | #DE935F | — |
| storage.type.optional.swift, storage.type.array.swift, storage.type.dictionary.swift, storage.type.tuple.swift, storage.type.closure.swift | #81A2BE | — |
| keyword.declaration.let.swift, keyword.declaration.var.swift, keyword.declaration.func.swift, keyword.declaration.class.swift, keyword.declaration.struct.swift, keyword.declaration.enum.swift, keyword.declaration.protocol.swift, keyword.declaration.extension.swift, keyword.declaration.actor.swift, keyword.other.guard.swift, keyword.other.defer.swift, keyword.other.fallthrough.swift, keyword.other.throws.swift, keyword.other.rethrows.swift, keyword.other.associatedtype.swift, keyword.other.typealias.swift, keyword.other.init.swift, keyword.other.deinit.swift | #B294BB | — |
| keyword.other.lazy.swift, keyword.other.weak.swift, keyword.other.unowned.swift, keyword.other.mutating.swift, keyword.other.nonmutating.swift, keyword.other.indirect.swift, keyword.other.final.swift, keyword.other.dynamic.swift, keyword.other.public.swift, keyword.other.private.swift, keyword.other.internal.swift, keyword.other.open.swift, keyword.other.fileprivate.swift, keyword.other.required.swift, keyword.other.optional.swift, keyword.other.convenience.swift | #B294BB | — |
| keyword.control.async.swift, keyword.control.await.swift, keyword.other.async.swift, keyword.other.await.swift, keyword.other.actor.swift | #B294BB | — |
| entity.name.function.init.swift, entity.name.function.deinit.swift | #8ABEB7 | — |
| keyword.other.self.swift, keyword.other.Self.swift, keyword.other.super.swift | #B294BB | — |
| variable.other.enummember.swift | #B5BD68 | — |
| constant.numeric.integer.swift, constant.numeric.float.swift, constant.numeric.hex.swift, constant.numeric.octal.swift | #F0C674 | — |
| constant.language.boolean.swift, constant.language.nil.swift | #DE935F | — |
| constant.character.escape.swift | #F0C674 | — |
| keyword.other.resource.terraform, keyword.other.data.terraform, keyword.other.provider.terraform, keyword.other.variable.terraform, keyword.other.output.terraform, keyword.other.locals.terraform, keyword.other.module.terraform, keyword.other.terraform.terraform, keyword.other.required_providers.terraform, keyword.other.backend.terraform | #B294BB | — |
| entity.name.type.resource.terraform, entity.name.type.data.terraform, entity.name.type.provider.terraform, entity.name.type.variable.terraform, entity.name.type.module.terraform, support.type.terraform | #DE935F | — |
| variable.other.block.terraform, variable.other.attribute.terraform | #C5C8C6 | — |
| support.function.terraform | #8ABEB7 | — |
| meta.block.terraform, meta.attribute.terraform, punctuation.definition.block.terraform | #C5C8C6 | — |
| punctuation.definition.table.toml, punctuation.definition.array.table.toml, meta.table.toml, meta.array.table.toml | #B294BB | — |
| constant.other.date.toml, constant.other.time.toml | #8ABEB7 | — |
| entity.other.anchor.yaml, entity.other.alias.yaml, punctuation.definition.anchor.yaml, punctuation.definition.alias.yaml | #8ABEB7 | — |
| meta.tag.yaml | #F0C674 | — |
| punctuation.definition.sequence.yaml, punctuation.definition.mapping.yaml, meta.mapping.yaml, meta.sequence.yaml | #C5C8C6 | — |
| string.unquoted.plain.out.yaml | #DE935F | — |
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}!`;
}