A Semantic Syntax Theme System — A color vocabulary for code.
Lexicon is a semantic syntax theme system for C# in Visual Studio using Codist (GitHub · Marketplace). Every color carries meaning—once you learn the vocabulary, any C# codebase becomes easier to read.
You already know the difference between a class and a struct. Between an
ifstatement and a method call. Between a constant and a variable. Lexicon makes your editor know it too.
- 🎨 11 semantic categories: types, data, control flow, exceptions, literals, and more
- 🌈 10 coordinated dark themes sharing the same semantic vocabulary
- 🔍 Designed for: code review, debugging, and onboarding to unfamiliar codebases
| Category | Semantic Role | Color |
|---|---|---|
| Reference Types | Heap-allocated, polymorphic types | 🟣 Purple |
| Value Types | Stack-allocated, copy-semantic types | 🔵 Blue |
| Interfaces | Behavioral contracts | 🩵 Cyan + Italic |
| Callables | Methods, constructors | 🟡 Yellow |
| Data | Fields, properties, parameters | 💠 Light Blue |
| Control Flow | if, for, while, switch |
🟠 Orange + Bold |
| Exceptions | try, catch, throw |
🔴 Coral |
| String Literals | "text", $"interpolated" |
🟢 Green |
| Literal Values | 42, true, null, enum members |
🟤 Amber |
| Namespaces | Organizational scope | 🩶 Teal |
| Keywords | class, public, async |
💜 Soft Purple |
Recommended starting point: Lexicon Twilight, with Beacon available as a high-contrast option.
- Open Visual Studio
- Go to Tools → Options → Codist → Syntax Highlight
- Click Load and select the
.stylesfile from your chosen theme folder (e.g.,themes/twilight/Lexicon-Twilight.styles)
The custom classification types (Lexicon: Exception Keyword and Lexicon: Captured Variable) must be registered in your global Codist configuration folder.
Location of the global Codist config folder:
%APPDATA%\Codist
Or typically:
C:\Users\<YourUsername>\AppData\Roaming\Codist
Steps:
- Navigate to your Codist config folder (create it if it doesn't exist)
- Copy
ClassificationTypes.jsonfrom your theme folder to this location- If the file already exists, merge the
itemsarray contents
- If the file already exists, merge the
- Restart Visual Studio for the changes to take effect
Example merge: If you already have classification types defined, add the Lexicon items to the existing array:
{
"items": [
// ... your existing items ...
{
"name": "Lexicon: Exception Keyword",
"foreground": "#f7768e",
"bold": true
},
{
"name": "Lexicon: Captured Variable",
"background": "#30ffa657"
}
]
}Copy Codist.ct.yaml from your theme folder to %APPDATA%\Codist\Codist.ct.yaml
See LICENSE for details.