Conversation
lildude
left a comment
There was a problem hiding this comment.
See inline comment. Please also follow the instructions for adding the grammar in CONTRIBUTING.md.
… heuristic and adding dedicated extensions
lildude
left a comment
There was a problem hiding this comment.
Don't remove the two missing grammar licences. I'm trying to get the author to restore the repos.
|
You're right — thanks for pointing that out. I ran If you could point me in the right direction, I’d really appreciate it 🙏! Apologies again for the unintended change. |
|
The easiest would be to revert your previous commit and then re-apply just your changes. |
|
Hi @lildude 👋 Gentle ping on this — updates done per your feedback (extensions & licenses) - Could you take a look when you have a moment? Thanks for your time! |
lildude
left a comment
There was a problem hiding this comment.
See inline comments. Additionally, as you're adding support only for filenames, the samples need to match those filenames. None of your samples do so they need to be replaced with real examples of those you're adding support for.
Co-authored-by: Colin Seymour <colin@github.com>
lildude
left a comment
There was a problem hiding this comment.
Samples can not be in subdirectories. Please move them to a level.
Please also update the PR template to provide individual links to the search results for each of the filenames you're adding and fix the information about the samples' sources and licences.
- Move all BIRD2 sample configuration files from subdirectories to the top-level directory ().
@lildude Thanks for the feedback and detailed explanation! I've made the following changes based on your suggestions:
Please take another look, and let me know if there are any further changes required. |
|
Hi @lildude, could you take a look at this when you have a chance? 🙂 Updates are in place, and I really appreciate your help! |
|
Hi @lildude 👋 Hope you’re doing well! Just wanted to gently follow up on this PR when you have a moment. I believe all the requested changes have been addressed, and it’s currently awaiting your review. Please let me know if there’s anything else you’d like me to adjust. Really appreciate your time and guidance on this! Thanks in advance 🙏 |
lildude
left a comment
There was a problem hiding this comment.
The test failure is because samples/BIRD2/bird.conf is in the wrong place. It needs to be at samples/BIRD2/filenames/bird.conf
Thanks for catching that! 🙏 I've moved the sample config to Please let me know if there’s anything else you'd like me to adjust. |
|
a bunch of the regexes have extra erroneous backslashes
|

Summary
This PR introduces syntax highlighting support for the BIRD2 configuration language via
.conffiles used by the BIRD Internet Routing Daemon.Unlike simpler configuration models (e.g., INI or Nginx), BIRD employs a uniquely intricate paradigm with distinct implementation challenges. We address this by adding a
textmategrammar with precise scoping for:Motivation
BIRD2 powers critical Internet infrastructure at scale, including:
Despite its critical role in major Internet infrastructure, editors like VSCode and Shiki lack native grammar support for BIRD2 configurations. This PR aims to fill that gap.
References
License
Checklist:
The extension of the new language is used in hundreds of repositories on GitHub.com.
bird.conf: 1.3k+ https://github.com/search?q=path%3Abird.conf&type=codebird6.conf: 275+ https://github.com/search?q=path%3Abird6.conf&type=codebird2.conf: 149+ https://github.com/search?q=path%3Abird2.conf&type=codeI have included a real-world usage sample for all extensions added in this PR:
I have included a syntax highlighting grammar: https://github.com/bird-chinese-community/BIRD-tm-language-grammar/blob/main/Syntaxes/bird2.tmLanguage.json
I have added a color
#b6d7e4I have updated the heuristics to distinguish my language from others using the same extension.