Skip to content

Add Blueprint language#8001

Open
kaypes wants to merge 14 commits into
github-linguist:mainfrom
kaypes:main
Open

Add Blueprint language#8001
kaypes wants to merge 14 commits into
github-linguist:mainfrom
kaypes:main

Conversation

@kaypes
Copy link
Copy Markdown

@kaypes kaypes commented Jun 1, 2026

Adds Blueprint (.blp) as a markup language - the descriptive user interface language for GTK4 and Libadwaita.

Description

Blueprint is a markup language designed for building GTK user interfaces. Created to replace verbose XML .ui files with a clean and human-readable syntax, it is heavily used by modern Linux app developers in the GNOME ecosystem. Despite its widespread adoption and support in tools like GNOME Builder and Workbench, it currently lacks language recognition and syntax highlighting on GitHub.

Checklist:

  • I am adding a new language.
    • The extension of the new language is used in hundreds of repositories on GitHub.com.
    • I have included a real-world usage sample for all extensions added in this PR:
      • Sample source(s):
      • 2 original samples demonstrating simple windows, UI signals, and Libadwaita widgets.
      • Sample license(s): Unlicense / MIT
    • I have included a syntax highlighting grammar: https://github.com/kaypes/blueprint-grammar
    • I have added a color
      • Hex value: #3584E4
      • Rationale: Official GNOME blue, the standard accent color used across GNOME HIG (Human Interface Guidelines) and Libadwaita.
    • I have updated the heuristics to distinguish my language from others using the same extension.
      • No heuristics needed - .blp is not used by any other language in Linguist.

kaypes added 3 commits June 1, 2026 11:32
- Register Blueprint in languages.yml (language_id: 765545512)
- Add blueprint-grammar submodule (source.blueprint-gtk)
- Add grammars.yml entry
- Add 2 sample .blp files
- Aliases: blueprint, blp
- Extension: .blp
- Color: #3584E4 (Adwaita default)
@kaypes kaypes requested a review from a team as a code owner June 1, 2026 15:03
Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot accept the grammar you are proposing due to it's license. We can only accept grammars with one of these licenses as called out in the CONTRIBUTING.md file.

kaypes

This comment was marked as low quality.

@kaypes kaypes requested a review from lildude June 1, 2026 15:14
kaypes added 2 commits June 2, 2026 14:20
Swapped the LGPL grammar for a new custom MIT one.
Updated languages.yml to match the cleaner scope of the new custom grammar.
@kaypes kaypes closed this Jun 2, 2026
@kaypes kaypes reopened this Jun 2, 2026
Copy link
Copy Markdown
Author

@kaypes kaypes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote a brand new grammar under the MIT license to fix the issue

Comment thread grammars.yml Outdated
lildude
lildude previously requested changes Jun 4, 2026
Copy link
Copy Markdown
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you didn't use the script/add-grammar to replace the grammar as the test failure illustrates and my previous comment.

Please do so. You can find details for replacing a grammar in the CONTRIBUTING.md file… you can replace a grammar with itself.

@Alhadis
Copy link
Copy Markdown
Collaborator

Alhadis commented Jun 4, 2026

No longer relevant, please ignore.

@kaypes I've fixed your pull-request locally, but you need to give me write access to your Linguist fork:

λ GitHub-Linguist (blueprint): git push -u fork
Enumerating objects: 25, done.
Counting objects: 100% (25/25), done.
Delta compression using up to 16 threads
Compressing objects: 100% (16/16), done.
Writing objects: 100% (16/16), 1.47 KiB | 1.47 MiB/s, done.
Total 16 (delta 10), reused 0 (delta 0), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (10/10), completed with 7 local objects.
To github.com:kaypes/linguist.git
 ! [remote rejected]   blueprint -> blueprint (permission denied)
error: failed to push some refs to 'github.com:kaypes/linguist.git'

The issue appeared to be with your submodule's version history. The commits it was referencing didn't exist (I'm guessing you must've force-pushed to kaypes/blueprint-grammar or something, leaving Linguist with its own—now unique—copy of the submodule, entirely divorced from your branch).

EDIT: Whoops, never mind. It was a misconfigured remote on my part. I've pushed the fixes to your branch.

@Alhadis Alhadis dismissed lildude’s stale review June 4, 2026 23:43

I gave old mate a helping hand.

@Alhadis Alhadis requested a review from lildude June 4, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants