Skip to content
프로젝트

EmranMR/tree-sitter-blade

GitHub에서 보기

소개

tree-sitter grammar for Laravel blade files

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Tree-Sitter-Blade 🌳


⚠️v0.12.0 Upgrade Guide ✨

  • The grammar has been pretty much rewritten from the ground up. tree-sitter-blade now inherits html and takes control of the html tree structure as well
  • The grammar is way more semantic, leaner and much faster, like lightening fast (10x) thanks to the drastically improved performance
  • Please read the v0.12.0 Release Note for the Upgrade Guide, if you have any questions, feel free to start a discussion or raise an issue

Introduction (feel free to skip)

This project aims to write the tree-sitter grammar for Laravel Blade.

This grammar can be used in any editor or service that support Tree-Sitter. Such as, but not limited to:

  • Neovim
  • Zed
  • Nova
php injection

Common Editors Set Up 💻

alt text Nova

Simply install the Laravel Suite Extension from the Extension Library. That includes:

  1. Language Injections
  2. Autocompletion
  3. Folding
  4. Syntax Highlighting
  5. Auto Indentation

alt texteoVim

Simply use the nvim-treesitter plugin and install the blade grammar.

alt text Zed

Simply download the extension from zed Extension marketplace

Queries

[!NOTE] Your editor or service might use a different capture group name or predicates than the queries in the queries/ folder. Consequently, you will need to find out how to approach queries or where they are stored and used in your editor's documentation. For example Nova does not use anything in this folder and uses its own Queries folder instead.

Here's an example of all the various languages that are injected:

php injection

And here's an example of folding in action:

php injection

Issues

If something does not look right please raise an issue with a detailed examples of what you are trying to achieve. Add any of the following if necessary:

  • Code Excerpts (allows me to test)
  • Photo of the issue
  • Parse Tree (if inspectable by your editor)

If you need help with anything else or would like to share tips and tricks for your fellow devs, feel free to use the discussion tab and create a discussion!

👥 Contributing

See the contribution guidelines for more details, as well as in depth info about the grammar itself.

Anyone said coffee? ☕

Buy Me A Coffee

관련 프로젝트 살펴보기

불러오는 중…