Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blueprint language #7213

Merged
merged 3 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions book/src/generated/lang-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| beancount | ✓ | | | |
| bibtex | ✓ | | | `texlab` |
| bicep | ✓ | | | `bicep-langserver` |
| blueprint | ✓ | | | |
| c | ✓ | ✓ | ✓ | `clangd` |
| c-sharp | ✓ | ✓ | | `OmniSharp` |
| cabal | | | | |
Expand Down
13 changes: 13 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2577,3 +2577,16 @@ indent = { tab-width = 4, unit = "\t" }
[[grammar]]
name = "just"
source = { git = "https://github.com/IndianBoy42/tree-sitter-just", rev = "8af0aab79854aaf25b620a52c39485849922f766" }

[[language]]
name = "blueprint"
scope = "source.blueprint"
injection-regex = "blueprint"
file-types = ["blp"]
roots = []
comment-token = "//"
indent = { tab-width = 4, unit = " " }

[[grammar]]
name = "blueprint"
source = { git = "https://gitlab.com/gabmus/tree-sitter-blueprint.git", rev = "7f1a5df44861291d6951b6b2146a9fef4c226e14" }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
source = { git = "https://gitlab.com/gabmus/tree-sitter-blueprint.git", rev = "7f1a5df44861291d6951b6b2146a9fef4c226e14" }
source = { git = "https://gitlab.com/gabmus/tree-sitter-blueprint", rev = "7f1a5df44861291d6951b6b2146a9fef4c226e14" }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

56 changes: 56 additions & 0 deletions runtime/queries/blueprint/highlights.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
(object_id) @attribute

(string) @string
(escape_sequence) @constant.character.escape

(comment) @comment

(constant) @constant.builtin
(boolean) @constant.builtin.boolean

(template) @keyword

(using) @keyword.control.import

(decorator) @attribute

(property_definition (property_name) @variable.other.member)

(object) @type

(signal_binding (signal_name) @function.builtin)
(signal_binding (function (identifier)) @function)
(signal_binding "swapped" @keyword)

(styles_list "styles" @function.macro)
(layout_definition "layout" @function.macro)

(gettext_string "_" @function.builtin)

(menu_definition "menu" @keyword)
(menu_section "section" @keyword)
(menu_item "item" @function.macro)

(template_definition (template_name_qualifier) @keyword.storage.type)

(import_statement (gobject_library) @namespace)

(import_statement (version_number) @constant.numeric.float)

(float) @constant.numeric.float
(number) @constant.numeric

[
";"
"."
","
] @punctuation.delimiter

[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket