Installation¶
Prerequisites¶
Required¶
- Visual Studio Code v1.105.0 or later
Optional¶
- BPP+ Preprocessor - Adds labels, scopes, and modular compilation to BASIC v2
- Node.js v16.0 or later - Required only for building from source
- vsce - Required only for building from source
Installation methods¶
Method 1: Install pre-compiled extension¶
The repository includes a pre-compiled .vsix file in the dist/ folder.
# Clone repository
git clone https://github.com/cbase-larrymod/bpp-plus-syntax-highlighter.git
cd bpp-plus-syntax-highlighter
Install the extension:
Via VS Code UI:
- Open Extensions panel (
Ctrl+Shift+XorCmd+Shift+X) - Click the
⋯menu (top-right of Extensions panel) - Select Install from VSIX
- Navigate to
dist/bpp-plus-basic-v2-syntax-0.0.7.vsix - Click Install
Via command line:
code --install-extension dist/bpp-plus-basic-v2-syntax-0.0.7.vsix
Method 2: Build and install from source¶
# Clone repository
git clone https://github.com/cbase-larrymod/bpp-plus-syntax-highlighter.git
cd bpp-plus-syntax-highlighter
# Install vsce
npm install -g @vscode/vsce
# Build the extension package
npm run package
The package command creates dist/bpp-plus-basic-v2-syntax-0.0.7.vsix.
Install using VS Code UI or command line (see Method 1).
Method 3: Development installation¶
For development and testing:
- Clone the repository
- Open the repository folder in VS Code
- Press
F5to launch a development window
See Development and testing for details.
Verification¶
# Create a test file
echo '10 print "hello world"' > test.bas
code test.bas
Expected behavior:
- Activation: Extension loads when you open
.basor.bppfiles - Syntax highlighting: Keywords like
printappear styled according to your color theme - Status bar indicator: Bottom-right corner shows BPP+ BASIC v2 as the language mode
Verification checklist¶
- Keywords highlighted -
print,for,gosub,ifappear styled - Numbers highlighted - Line numbers and numeric literals are distinct
- Strings highlighted - Double-quoted text appears in string color
- Comments highlighted -
remor;statements appear in comment color - Snippets available - Type
forand pressTabto test snippet expansion
Manual language selection¶
If syntax highlighting does not activate automatically:
- Click the language selector (bottom-right corner of VS Code window)
- Type or select BPP+ BASIC v2 from the language list
- Syntax highlighting activates
This may occur if:
- You opened a file without
.basor.bppextension - Another extension claimed the file association
File associations¶
.bas- Standard BASIC v2 source files (line-numbered or preprocessed).bpp- BPP+ preprocessor source files (with labels, scopes, and includes)
Extension precedence¶
If multiple extensions register for the same file type, VS Code determines precedence by:
- User-configured file associations in
settings.json - Most recently installed extension
- Extension with higher activation priority
To set BPP+ Syntax Highlighting as the handler:
// In VS Code settings.json
"files.associations": {
"*.bas": "bpp+basicv2",
"*.bpp": "bpp+basicv2"
}
Language identifier¶
Language ID bpp+basicv2 is used for:
- Programmatic language selection via VS Code API
- Workspace-specific language overrides
- Extension dependency declarations
- Language-specific settings configuration
Next steps¶
See Quick start.