brainrotscript
Version:
🧠A brainrot programming language that compiles to JavaScript - because why write normal code when you can write code that's absolutely sending you? 💀
174 lines (140 loc) • 5.39 kB
Markdown
# 🎨 IDE Syntax Highlighting Setup for BrainrotScript
Get beautiful syntax highlighting for your `.brainrot` files in any editor!
## 🔷 VS Code (Recommended)
I've created a complete VS Code extension for you!
### Method 1: Use the Built Extension
1. Copy the `.vscode/extensions/brainrotscript` folder to your VS Code extensions directory:
- **Windows:** `%USERPROFILE%\.vscode\extensions\`
- **Mac:** `~/.vscode/extensions/`
- **Linux:** `~/.vscode/extensions/`
2. Restart VS Code
3. Open any `.brainrot` file - syntax highlighting will work automatically!
### Method 2: Quick File Association (Temporary)
1. Open a `.brainrot` file in VS Code
2. Click the language indicator in the bottom right (probably says "Plain Text")
3. Type "JavaScript" and select it
4. Your file will get JavaScript-like highlighting
## 🔶 Sublime Text
### Custom Syntax File
1. Go to `Preferences > Browse Packages`
2. Create a new folder called `BrainrotScript`
3. Create a file called `BrainrotScript.sublime-syntax`:
```yaml
%YAML 1.2
name: BrainrotScript
file_extensions:
- brainrot
scope: source.brainrotscript
contexts:
main:
- match: '\b(job_application|its_giving|vibe_check|big_yikes|lock_in|whatever|wallahi|no_cap|ghost|flex|goon|squad|me_fr)\b'
scope: keyword.control.brainrotscript
- match: '"'
scope: punctuation.definition.string.begin.brainrotscript
push: double_quoted_string
- match: "'"
scope: punctuation.definition.string.begin.brainrotscript
push: single_quoted_string
- match: '//'
scope: punctuation.definition.comment.brainrotscript
push: line_comment
double_quoted_string:
- meta_scope: string.quoted.double.brainrotscript
- match: '\\.'
scope: constant.character.escape.brainrotscript
- match: '"'
scope: punctuation.definition.string.end.brainrotscript
pop: true
single_quoted_string:
- meta_scope: string.quoted.single.brainrotscript
- match: '\\.'
scope: constant.character.escape.brainrotscript
- match: "'"
scope: punctuation.definition.string.end.brainrotscript
pop: true
line_comment:
- meta_scope: comment.line.double-slash.brainrotscript
- match: $
pop: true
```
4. Save and restart Sublime Text
## 🔸 Vim/Neovim
### Custom Syntax File
1. Create the directory: `~/.vim/syntax/` (or `~/.config/nvim/syntax/` for Neovim)
2. Create a file called `brainrotscript.vim`:
```vim
" Vim syntax file
" Language: BrainrotScript
" Maintainer: BrainrotScript Team
if exists("b:current_syntax")
finish
endif
" Keywords
syn keyword brainrotKeyword job_application its_giving vibe_check big_yikes
syn keyword brainrotKeyword flex goon squad me_fr spawn alpha inherits_drip
syn keyword brainrotStorage lock_in whatever wild
syn keyword brainrotConstant wallahi no_cap ghost
syn keyword brainrotBuiltin yoink drop what_is same_energy fuck_around caught_4k
" Strings
syn region brainrotString start='"' end='"' contains=brainrotStringEscape
syn region brainrotString start="'" end="'" contains=brainrotStringEscape
syn match brainrotStringEscape "\\." contained
" Comments
syn match brainrotComment "//.*$"
syn region brainrotComment start="/\*" end="\*/"
" Numbers
syn match brainrotNumber "\<\d\+\>"
syn match brainrotNumber "\<\d\+\.\d\+\>"
" Highlighting
hi def link brainrotKeyword Statement
hi def link brainrotStorage StorageClass
hi def link brainrotConstant Constant
hi def link brainrotBuiltin Function
hi def link brainrotString String
hi def link brainrotStringEscape SpecialChar
hi def link brainrotComment Comment
hi def link brainrotNumber Number
let b:current_syntax = "brainrotscript"
```
3. Add to your `~/.vimrc` (or `~/.config/nvim/init.vim`):
```vim
au BufRead,BufNewFile *.brainrot set filetype=brainrotscript
```
## 🔹 Atom (Legacy)
### Custom Grammar
1. Go to `Packages > Settings View > Install Packages/Themes`
2. Search for "language-generic" and install it
3. Create a file `~/.atom/packages/language-brainrotscript/grammars/brainrotscript.cson`:
```coffeescript
'scopeName': 'source.brainrotscript'
'name': 'BrainrotScript'
'fileTypes': ['brainrot']
'patterns': [
{
'match': '\\b(job_application|its_giving|vibe_check|big_yikes|lock_in|whatever|wallahi|no_cap|ghost)\\b'
'name': 'keyword.control.brainrotscript'
}
{
'begin': '"'
'end': '"'
'name': 'string.quoted.double.brainrotscript'
}
{
'match': '//.*$'
'name': 'comment.line.double-slash.brainrotscript'
}
]
```
## 🔺 Quick Fix for Any Editor
If your editor doesn't have custom syntax support, you can:
1. **Associate with JavaScript** - Most editors let you associate `.brainrot` files with JavaScript syntax
2. **Use a plugin** - Look for "custom syntax" or "language definition" plugins
3. **Manual highlighting** - Some editors let you manually set language mode per file
## 🎯 Testing Your Syntax Highlighting
After setting up, open your `test.brainrot` file and you should see:
- **Keywords** in purple/blue (job_application, vibe_check, etc.)
- **Strings** in green
- **Comments** in gray/green
- **Numbers** in orange
**Your BrainrotScript code should now look absolutely fire! 🔥**