- Table of Contents
- Introduction
- Why This Project
- Try It Live
- Editors & IDE Support
- 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.
Note: We are still in the testing phase for our support for Vim syntax highlighting.
- 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
Or manual copy: - Vim:
cp grammars/bird2.syntax.vim ~/.vim/syntax/bird2.vim && cp -r misc/vim/ftdetect ~/.vim/
- Neovim:
cp grammars/bird2.syntax.vim ~/.config/nvim/syntax/bird2.vim && cp -r misc/nvim/plugin ~/.config/nvim/
- Only Neovim:
- Open
sample/basic.conf
and 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
.vsix
package; b) Unzip the.vsix
file 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
bird2
appears and check the box; - Follow prompts to restart the IDE.
-
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