How to post code with syntax highlighting
Wrap code in triple backticks and add a language name like js, python or lua after the opening backticks to get colors and a label.
Put three backticks on the line before and after your code. Add a language name after the first three, and GameVox colors the code and adds a language label and a Copy button.
```lua
local name = "GameVox"
print("Hello, " .. name)
``` For a short bit of code inside a sentence, use single backticks:
Use the `print()` function to debug. When you paste code into a message, GameVox wraps it in a code block for you. If a block has no language name, GameVox guesses the language and labels it with an auto tag.
Language names
Names are not case sensitive.
| Language | Names you can use |
|---|---|
| JavaScript | js, javascript |
| TypeScript | ts, typescript |
| Python | python, py |
| Go | go, golang |
| Rust | rust |
| Java | java |
| C | c |
| C++ | cpp, c++ |
| C# | cs, csharp, c# |
| PHP | php |
| Kotlin | kotlin, kt |
| Swift | swift |
| Dart | dart |
| Lua | lua |
| Perl | perl, pl |
| Ruby | ruby, rb |
| Scala | scala |
| Haskell | haskell, hs |
| Elixir | elixir, ex, exs |
| Erlang | erlang, erl |
| R | rlang, r |
| Bash and shell | bash, sh, shell, zsh |
| PowerShell | powershell, ps, ps1, psm1 |
| SQL | sql |
| HTML | html |
| CSS | css |
| XML | xml |
| JSON | json |
| YAML | yaml, yml |
| TOML and INI | toml, ini, cfg, conf |
| Dockerfile | docker, dockerfile |
| Terraform and HCL | terraform, hcl, tf |
| Protobuf | protobuf, proto |
| GraphQL | graphql, gql |
| Zig | zig |
| Nim | nim |
| V | v |
| Odin | odin |
| Gleam | gleam |
| Markdown | markdown, md |
| Plain text, no colors | text, txt, plain, plaintext |
For other formatting, see the text formatting cheat sheet.