PHPackages                             putyourlightson/craft-autocomplete - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. putyourlightson/craft-autocomplete

Abandoned → [nystudio107/craft-autocomplete](/?search=nystudio107%2Fcraft-autocomplete)Library[Templating &amp; Views](/categories/templating)

putyourlightson/craft-autocomplete
==================================

Provides autocompletion for Craft and plugins in Twig templates.

1.0.1(4y ago)131.5k1MITPHP

Since Jul 15Pushed 4y ago1 watchersCompare

[ Source](https://github.com/putyourlightson/craft-autocomplete)[ Packagist](https://packagist.org/packages/putyourlightson/craft-autocomplete)[ RSS](/packages/putyourlightson-craft-autocomplete/feed)WikiDiscussions v1 Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

[![Stable Version](https://camo.githubusercontent.com/22c370037178627c9e3fceaba7ca0ecbb087173ae63f70662eebb51e91176782/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707574796f75726c69676874736f6e2f63726166742d6175746f636f6d706c6574653f6c6162656c3d737461626c65)](https://camo.githubusercontent.com/22c370037178627c9e3fceaba7ca0ecbb087173ae63f70662eebb51e91176782/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f707574796f75726c69676874736f6e2f63726166742d6175746f636f6d706c6574653f6c6162656c3d737461626c65)[![Total Downloads](https://camo.githubusercontent.com/d8167fb8b0586d3bbbb7e46de33886f42e6343be4b6fc9d1d9bc475eae4595ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f707574796f75726c69676874736f6e2f63726166742d6175746f636f6d706c657465)](https://packagist.org/packages/putyourlightson/craft-autocomplete)

Autocomplete for Craft CMS \[DEPRECATED\]
=========================================

[](#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/).

[](#️-this-package-has-been-replaced-by-the-superior-craft-autocomplete-as-a-collaboration-between-putyourlightson-and-nystudio107)

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:

[![demo](https://user-images.githubusercontent.com/57572400/126911028-7d7d06dd-c60f-42b9-ae42-95d5f078a229.gif)](https://user-images.githubusercontent.com/57572400/126911028-7d7d06dd-c60f-42b9-ae42-95d5f078a229.gif)

Usage
-----

[](#usage)

Install the package using composer.

```
composer require putyourlightson/craft-autocomplete

```

Ensure that the Symfony plugin is installed and enabled in PhpStorm:

Once your IDE indexes the files, autocompletion for Craft and supported plugins will immediately become available in your Twig templates.

[![screenshot](https://user-images.githubusercontent.com/57572400/125784167-618830ae-e475-4faf-81d3-194ad7ce3a08.png)](https://user-images.githubusercontent.com/57572400/125784167-618830ae-e475-4faf-81d3-194ad7ce3a08.png)

### Adding Custom Variables

[](#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).

```
