Skip to content

bird-chinese-community/BIRD-tm-language-grammar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BIRD2 Configuration Language

Preview

English | 简体中文

TextMate Grammar Vim Syntax

Table of Contents

Introduction

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.

Why This Project

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.

Try It Live

Editors & IDE Support

VSCode

VSCode Syntax Highlighting Preview

VS Code Marketplace Open VSX Registry

Vim

Vim Syntax Highlighting Preview

Note

We recommend using VSCode for the best experience.

Note: We are still in the testing phase for our support for Vim syntax highlighting.

  1. Clone this repository: git clone https://github.com/bird-chinese-community/bird-tm-language-grammar.git.
  2. 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/
  3. Open sample/basic.conf and verify highlighting. Optional: use :verbose set ft? to confirm filetype=bird2.

Jetbrains (TextMate Bundles)

JetBrains IDEA Syntax Highlighting Preview

Note

We recommend VSCode for the best experience, but JetBrains with TextMate Bundles works well for syntax highlighting.

  1. 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 containing package.json, keep this path for the next step;
  2. Open IntelliJ IDEA: Settings/Preferences ▸ Editor ▸ TextMate Bundles;
  3. Click ➕ (Add) and select the directory from step 1(c);
  4. Scroll the language list, confirm that bird2 appears and check the box;
  5. Follow prompts to restart the IDE.

Project Status

Community Adoption Evidence

GitHub Usage Statistics

Production Deployment at Internet Scale

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

Contributors

The BIRD Chinese Community extends gratitude to these contributors:

License

About

This repository hosts syntax files (`tmLanguage`) for BIRD2 (bird.conf).

Topics

Resources

License

MIT, MPL-2.0 licenses found

Licenses found

MIT
LICENSE.sample
MPL-2.0
LICENSE.syntax

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •