UwU Linter — Syntax Highlighter for UwU Language
UwU Linter is a lightweight Visual Studio Code extension that adds syntax highlighting and semantic decorations for the custom UwU language.
It identifies keywords, variables, types, operators, numbers, comments, strings, functions, and more — applying a fun, visually distinct color palette to make code easier to read.
Features
UwU Linter provides semantic highlighting for the UwU DSL, including:
✔ Keywords
bring, fun, nofun, loop, noloop, if, elif, else, noif, from, to
✔ Types
int, float, string, bool, nothing, list, dict, char
✔ Operators
+, - (not part of ->), *, /, ==, !=, <=, >=, <, >
✔ Special Syntax
- Function definitions (
fun name -> returnType)
- Variable declarations
- Strings (
"hello" or 'hello')
- Comments (
<.< ... >.> or >.< comment)
- The
~ tilt operator
- Numbers
✔ Custom Palette
Colors are loaded from:
config/palette.json
Allowing full customization of the theme.
Usage
Once installed:
- Open any
.uwu file (or any file you want highlighted)
- Press Ctrl + Shift + P
- Run:
Uwu Linter: Decorate Text
The extension will parse your document and apply semantic decorations based on the defined palette.
How It Works
UwU Linter includes a custom tokenizer that:
Scans the document for:
- Comments
- Strings
- Keywords
- Variables
- Function names
- Operators
- Types
- Numbers
Ignores matches inside comments or strings
(so false positives won’t get highlighted)
Applies decorations using TextEditorDecorationType objects created from the color palette.
Everything is driven by regular expressions and a two-pass tokenizer:
- First pass: detect comments + strings
- Second pass: detect syntax tokens outside of them
This keeps highlights fast and accurate.
Customizing Colors
You can edit:
config/palette.json
Example:
{
"colors": {
"keyword": "#ff79c6",
"comment": "#6272a4",
"variables": "#8be9fd",
"type": "#bd93f9",
"functions": "#50fa7b",
"tilt": "#ffb86c",
"string": "#f1fa8c",
"operators": "#ff5555",
"number": "#8be9fd"
}
}
Restart the extension or reload the window to apply new colors.
Command List
| Command |
Description |
| UwU Linter: Decorate Text |
Runs the syntax decorator on the current editor |