- Table of Contents
- Introduction
- Why This Project
- Try It Live
- Editors & IDE Support
- Development Workflow
- Project Status
- Community Adoption Evidence
- Contributors
- License
BIRD (BIRD Internet Routing Daemon)
Open-source routing daemon for managing routing tables on network infrastructure.
This repository hosts syntax files (tmLanguage) for BIRD2, designed to enhance developer productivity through syntax highlighting in configuration files.
Unlike the straightforward paradigms of INI or Nginx configurations, BIRD employs a distinctly intricate configuration model with unique implementation challenges.
Despite its role in core internet infrastructure, BIRD2 still lacks native syntax highlighting and formatting support in mainstream editors like VSCode and Shiki.
Network engineers and developers have long relied on workarounds, such as using Nginx or INI syntax modes.
However, these do not accurately represent the complex grammar of BIRD2.
To address this issue, the BIRD Chinese Community has officially open-sourced a TextMate-based syntax grammar for BIRD2. Our goal is to improve developer experience and foster broader ecosystem support.
- 🌐 Playground (via Shiki preview): https://deploy-preview-149--textmate-grammars-themes.netlify.app/?theme=ayu-dark&grammar=bird2
- Install the VSCode extension from Open VSX Registry / VSCode Marketplace.
- Open any BIRD2 configuration file and enjoy syntax highlighting.
Note
We recommend using VSCode for the best experience.
Vim/Neovim support has been migrated to dedicated repositories for better maintenance and feature updates.
Dedicated Plugin Repositories:
Installation:
Vim (using vim-plug):
Plug 'bird-chinese-community/BIRD2.vim'Neovim (using lazy.nvim):
{
"bird-chinese-community/BIRD2.nvim",
ft = "bird2",
config = function()
require("bird2").setup()
end
}Backward Compatibility (still installable from this repo):
- Clone this repository:
git clone https://github.com/bird-chinese-community/bird-tm-language-grammar.git - Quick install:
bash scripts/install.sh(installs Vim and Neovim)- Only Neovim:
bash scripts/install.sh --neovim - Only Vim:
bash scripts/install.sh --vim
- Only Neovim:
- Open
sample/basic.confand verify highlighting. Optional: use:verbose set ft?to confirmfiletype=bird2
Note
We recommend VSCode for the best experience, but JetBrains with TextMate Bundles works well for syntax highlighting.
- Prepare the language pack
a) Open https://open-vsx.org/extension/BIRDCC/vscode-bird2-conf ▸ Resources (lower right) ▸ Download the latest
.vsixpackage; b) Unzip the.vsixfile using any archiver; c) In the unzipped folder, locate the directory containingpackage.json, keep this path for the next step; - Open IntelliJ IDEA: Settings/Preferences ▸ Editor ▸ TextMate Bundles;
- Click ➕ (Add) and select the directory from step 1(c);
- Scroll the language list, confirm that
bird2appears and check the box; - Follow prompts to restart the IDE.
This repository uses Prek as the pre-commit runner.
- Install Prek and install hooks:
prek install --install-hooks --hook-type pre-commit --hook-type pre-push --hook-type commit-msg
- Before/after editing syntax files, run targeted checks:
prek run --files grammars/bird2.tmLanguage.jsonprek run --files external/bird2.vim/syntax/bird2.vim external/bird2.nvim/syntax/bird2.vim
- Before pushing or opening a PR, run:
prek run --all-files
- Bump patch version for tm grammar + Vim/Neovim syntax snapshots:
node scripts/bump-version.js --dry-runnode scripts/bump-version.js
-
Pull requests have been submitted to upstream projects:
-
🚧 A VSCode plugin with full syntax highlighting and formatting support is actively under development.
- 👉 Join the closed beta on Telegram (Chinese only)
- 27k+ BIRD2 configuration snippets found in public repositories (View search results)
- 883+ active repositories using BIRD configurations (View search results)
BIRD2 powers critical internet infrastructure for major operators:
-
AMS-IX (World's largest IXP)
Handles >870 ASNs with 20k+ IPv4/5k+ IPv6 prefixes at 14Tb/s+ traffic
Route-Server Platform -
LINX (London Internet Exchange)
Migrated 1,000+ peer sessions to BIRD 2.13 across 7 global sites (2024)
Technology Update -
Cloudflare Anycast Edge
Deployed on every server in 280+ PoPs for sub-second failover routing
Architecture Deep Dive
The BIRD Chinese Community extends gratitude to these contributors:
- Syntax files are distributed under Mozilla Public License 2.0
- Sample configuration files (
/sample/*) are distributed under MIT License



