diff --git a/book/src/generated/lang-support.md b/book/src/generated/lang-support.md index 620d2dca6415..d57b400bfa3a 100644 --- a/book/src/generated/lang-support.md +++ b/book/src/generated/lang-support.md @@ -8,6 +8,7 @@ | beancount | ✓ | | | | | bibtex | ✓ | | | `texlab` | | bicep | ✓ | | | `bicep-langserver` | +| blade | ✓ | | | | | blueprint | ✓ | | | `blueprint-compiler` | | c | ✓ | ✓ | ✓ | `clangd` | | c-sharp | ✓ | ✓ | | `OmniSharp` | diff --git a/languages.toml b/languages.toml index d6f28809568a..43093190fda7 100644 --- a/languages.toml +++ b/languages.toml @@ -942,6 +942,17 @@ roots = ["composer.json", "index.php"] name = "php-only" source = { git = "https://github.com/tree-sitter/tree-sitter-php", rev = "cf1f4a0f1c01c705c1d6cf992b104028d5df0b53", subpath = "php_only" } +[[language]] +name = "blade" +scope = "source.blade.php" +file-types = [{ glob = "*.blade.php" }, "blade"] +injection-regex = "blade" +roots = ["composer.json", "index.php"] + +[[grammar]] +name = "blade" +source = { git = "https://github.com/EmranMR/tree-sitter-blade", rev = "4c66efe1e05c639c555ee70092021b8223d2f440" } + [[language]] name = "twig" scope = "source.twig" diff --git a/runtime/queries/blade/folds.scm b/runtime/queries/blade/folds.scm new file mode 100644 index 000000000000..c171148212b0 --- /dev/null +++ b/runtime/queries/blade/folds.scm @@ -0,0 +1,8 @@ +((directive_start) @start + (directive_end) @end.after + (#set! role block)) + + +((bracket_start) @start + (bracket_end) @end + (#set! role block)) \ No newline at end of file diff --git a/runtime/queries/blade/highlights.scm b/runtime/queries/blade/highlights.scm new file mode 100644 index 000000000000..b3d442a05f63 --- /dev/null +++ b/runtime/queries/blade/highlights.scm @@ -0,0 +1,4 @@ +(directive) @tag +(directive_start) @tag +(directive_end) @tag +(comment) @comment diff --git a/runtime/queries/blade/injections.scm b/runtime/queries/blade/injections.scm new file mode 100644 index 000000000000..4c6367349b55 --- /dev/null +++ b/runtime/queries/blade/injections.scm @@ -0,0 +1,9 @@ +((text) @injection.content + (#set! injection.combined) + (#set! injection.language php)) + +((php_only) @injection.content + (#set! injection.language php-only)) +((parameter) @injection.content + (#set! injection.language php-only)) +