https://github.com/putyourlightson/craft-autocomplete
Provides autocompletion for Craft CMS and plugins in Twig templates.
https://github.com/putyourlightson/craft-autocomplete
Last synced: 10 months ago
JSON representation
Provides autocompletion for Craft CMS and plugins in Twig templates.
- Host: GitHub
- URL: https://github.com/putyourlightson/craft-autocomplete
- Owner: putyourlightson
- License: mit
- Created: 2021-07-15T11:09:48.000Z (almost 5 years ago)
- Default Branch: v1
- Last Pushed: 2021-08-09T16:58:40.000Z (almost 5 years ago)
- Last Synced: 2024-11-29T11:07:45.994Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 36.1 KB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
[]((https://packagist.org/packages/putyourlightson/craft-autocomplete))
[](https://packagist.org/packages/putyourlightson/craft-autocomplete)
# Autocomplete for Craft CMS [DEPRECATED]
### ⚠️ This package has been replaced by the superior [Craft Autocomplete](https://github.com/nystudio107/craft-autocomplete) as a collaboration between [PutYourLightsOn](https://putyourlightson.com/) and [nystudio107](https://nystudio107.com/).
Provides autocompletion for Craft CMS and plugins in Twig templates.
Currently works with **PhpStorm only**, as VSCode does not support intellisense for Twig extensions.
Adapted from `FauxTwigExtension.php` by nystudio107 as documented in the article:
https://nystudio107.com/blog/auto-complete-craft-cms-3-apis-in-twig-with-phpstorm

## Usage
Install the package using composer.
```
composer require putyourlightson/craft-autocomplete
```
Ensure that the Symfony plugin is installed and enabled in PhpStorm:
https://plugins.jetbrains.com/plugin/7219-symfony-plugin
Once your IDE indexes the files, autocompletion for Craft and supported plugins will immediately become available in your Twig templates.

### Adding Custom Variables
You can add autocompletion for your own custom modules/plugins by creating a file called `AutocompleteVariable.php` and placing it inside any folder that PhpStorm will index (for example in the `/config` directory).
```php