Skip to content

While learning to create PHPStorm plugins: Complete by array return annotation

Notifications You must be signed in to change notification settings

aurelijusb/simple-phpstorm-plugin

Repository files navigation

Very simple PHPStorm plugin

Simple project, while learning to write plugins for PHPStorm.

Complete array keys by return description

Usage in PHPStorm

  • Download latest version: SimplePlugin-v0.3.zip
  • Settings -> Plugns -> Install from file system. Restart PHPStorm
  • CTRL+SPACE inside array keys.

PHP Code example:

/** @return string[] [user=>, password=>] */
function a() {
    return [];
}

$a = a()[''];

Setting up dev environment

Open, compile/run with IntelliJ IDEA

Creating something similar from scratch

  • New project -> IntelliJ Plugin -> Project SDK
  • Choose PHP storm installation
  • Update meta info
  • Run (PHP storm will be loaded)
  • You can check settings, your new plugin is there

Troubleshooting

  • Run/Debug Configuration -> Show idea log
  • Wipe sandbox ~/.IdeaIC14/system/plugins-sandbox

Useful links

Dependencies

  • php-openapi
  • junit:junit:4.8.1

Author

Aurelijus Banelis

License

Apache 2

About

While learning to create PHPStorm plugins: Complete by array return annotation

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages