Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smuuf/vscode-latte-lang
☕ Nette Latte extension for VS Code.
https://github.com/smuuf/vscode-latte-lang
extension frontend intellisense latte nette php template templating ui vscode webdesign webdevelopment
Last synced: 26 days ago
JSON representation
☕ Nette Latte extension for VS Code.
- Host: GitHub
- URL: https://github.com/smuuf/vscode-latte-lang
- Owner: smuuf
- License: mit
- Created: 2023-10-21T00:25:07.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-06T23:47:49.000Z (9 months ago)
- Last Synced: 2024-09-30T13:48:19.219Z (about 1 month ago)
- Topics: extension, frontend, intellisense, latte, nette, php, template, templating, ui, vscode, webdesign, webdevelopment
- Language: TypeScript
- Homepage:
- Size: 634 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Nette Latte extension for VS Code ☕
VS Code extension for Nette Latte template files.
## Installation
Open and install via VS Code Marketplace: [Nette Latte templates](https://marketplace.visualstudio.com/items?itemName=smuuf.latte-lang).## Provides
- **Syntax highlight** in Latte files.
- **Class-based declaration of template variables** via Latte tag `{templateType My\Lovely\Type}`.
- See [Latte docs](https://latte.nette.org/en/type-system) for detailed usage.
- **Go to variable definition** for variables defined in Latte files.
- **Go to class definition** of typed variables in Latte files.
- ![obrazek](https://github.com/smuuf/vscode-latte-lang/assets/6860713/0dadd251-77b7-4cd5-8f8d-e67f371f1aad)
- **Go to method definition** of methods called on typed variables in Latte files.
- **Go to referenced Latte files** used in `{include ...}`, `{layout ...}`, `{sandbox ...}`, `{extends ...}` tags.
- **Hover information** containing type of variables in Latte files.
- **Hover information** containing return type of method calls in Latte files.
- ![obrazek](https://github.com/smuuf/vscode-latte-lang/assets/6860713/4b9e4f2d-7a75-4580-a0ae-e1a69b0f8361)
- **Type inference** of values coming from known method calls with known return types.
- ![obrazek](https://github.com/smuuf/vscode-latte-lang/assets/6860713/2ad84aea-9956-4c8b-89db-dd0ef94af278)
- **Type resolution** of basic iterables.
- For example for `{foreach $a as $b}` where `$a` is of type `array` we will know `$b` is of type `MyType`.
- ![obrazek](https://github.com/smuuf/vscode-latte-lang/assets/6860713/e717a1a1-c4d1-43e6-b847-de412b29fc1e)
- **Autocomplete** support for `$variables` and `$object->methodName()` in Latte files.
- ![obrazek](https://github.com/smuuf/vscode-latte-lang/assets/6860713/180426ce-3150-4aa9-94a8-35b5c6530d78)### Types
The excentions supports resolving generic types for these basic iterable types:
- `array`
- `iterable`
- `\Iterator`
- `\IteratorAggregate`
- `\Traversable`
- `\Generator`