Sublime Text package providing BHL language support via the Language Server Protocol.
You need to have the BHL LSP server available. Clone the BHL repository to some directory and point the package at the bhl script (or bhl.bat on Windows). The package launches it as path/to/BHL/bhl lsp to start the language server.
You also need the LSP package installed via Package Control.
- Download the latest
BHL-Sublime.sublime-packagefrom Releases. - Copy it into your Sublime Text
Installed Packagesfolder:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Sublime Text/Installed Packages/ |
| Windows | %APPDATA%\Sublime Text\Installed Packages\ |
| Linux | ~/.config/sublime-text/Installed Packages/ |
Sublime Text picks it up automatically — no restart needed.
cp BHL-Sublime.sublime-package ~/Library/Application\ Support/Sublime\ Text/Installed\ Packages/Or use the Makefile:
make installCreate Packages/User/LSP-bhl.sublime-settings to override defaults. The Packages directory is at:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Sublime Text/Packages/ |
| Windows | %APPDATA%\Sublime Text\Packages\ |
| Linux | ~/.config/sublime-text/Packages/ |
You can also open it via Preferences → Browse Packages… in Sublime Text.
| Setting | Default | Description |
|---|---|---|
executablePath |
"" |
Path to the bhl executable. Leave empty to use bhl from PATH. On Windows use the .bat path, e.g. C:\BHL\bhl.bat. |
forceRebuild |
false |
Forces LSP server rebuild on startup by setting BHL_REBUILD=1. Useful during active development of an LSP server. |
// Packages/User/LSP-bhl.sublime-settings
{
"executablePath": "/Users/bob/BHL/bhl",
"forceRebuild": false
}Add --log-file=/tmp/bhlsp.log to the command array:
{
"executablePath": "/Users/bob/BHL/bhl",
"command": ["${bhl}", "lsp", "--log-file=/tmp/bhlsp.log"]
}Add "semantic_highlighting": true to your LSP package settings
(Preferences → Package Settings → LSP → Settings):
{
"semantic_highlighting": true
}BHL debugging requires the Debugger package installed via Package Control. The BHL debug adapter is bundled in this package and registers with Debugger automatically on startup — no extra configuration is needed.
Add a debugger_configurations entry to your .sublime-project file:
{
"folders": [
{ "path": "." }
],
"debugger_configurations": [
{
"type": "bhl",
"request": "attach",
"name": "Attach to BHL",
"host": "localhost",
"port": 7777,
"timeout": 30
}
]
}| Option | Default | Description |
|---|---|---|
host |
"localhost" |
Host where the BHL debug server is running |
port |
— | Port the BHL debug server listens on (required) |
timeout |
30 |
Seconds to wait for the debug server to become available |
- Start your Unity game — the BHL debug server begins listening on the configured port.
- Open the Debugger panel: Debugger → Open.
- Select Attach to BHL from the configuration list and press Run.
- Set breakpoints by clicking the gutter in any
.bhlfile.
Start using the package by opening the directory which contains the bhl.proj file
(Project → Add Folder to Project…). It must appear as a separate folder entry in the
sidebar. Try opening any .bhl file — if everything is correct you should see
"Indexing BHL scripts" in the status bar.