Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        



Nette Latte extension for VS Code ☕


VS Code extension for Nette Latte template files.




VS Code Marketplace Downloads


VS Code Marketplace Installs

## 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`