diff --git a/README.md b/README.md index 1de740c..1e17e26 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Qiq Templates Support is an IntelliJ-based plugin that brings syntax highlightin - **Composer-aware stub selection**: the strict (Qiq 1.x) or relaxed (Qiq 2.x / 3.x) escape signature is chosen automatically from `composer.lock`. - **Cross-template rename refactoring**: renaming a PHP property, method, or local variable propagates into every Qiq template that references it. Triggering Shift+F6 from inside a Qiq template (`{{h $article->title }}`) also works. - **Cross-template navigation**: Cmd/Ctrl+click (Go to Declaration) on `setLayout()`, `render()`, `include()`, or custom helpers to open the referenced template file. +- **Helper Go to Declaration**: Cmd/Ctrl+click on a helper call (`{{ helperName(...) }}` / `{{ $this->helperName(...) }}`) jumps to its PHP declaration. Qiq 2.x/3.x helpers (public methods on a `Qiq\Helpers` subclass) are discovered automatically; Qiq 1.x `HelperLocator::set()` helpers resolve once you point the plugin at your registration file in settings. Resolvable helper calls also stop triggering the "undefined function/method" warning. - **Enter/typing handlers** that auto-complete Qiq block closers and keep indentation consistent. - **Template discovery**: resolves relative paths by walking up from the current file, project roots, and PHP server document roots. @@ -21,6 +22,7 @@ Qiq Templates Support is an IntelliJ-based plugin that brings syntax highlightin Open **Settings (Preferences) → Languages & Frameworks → Qiq Templates** for project-level options: - **Inject `declare(strict_types=1)` into Qiq templates** *(off by default)* — when enabled, scalar literal misuses such as `{{h true }}`, `{{h 123 }}`, or `{{h null }}` surface as PhpStorm type warnings. Useful when your project renders templates under PHP strict types; off by default to match Qiq's runtime, which performs implicit scalar→string casts. +- **Helper Locator bootstrap files** — for Qiq 1.x projects, list the PHP file(s) that register helpers via `$locator->set('name', ...)`. The plugin scans them to resolve helper calls for Go to Declaration. Not needed for Qiq 2.x/3.x, whose `Qiq\Helpers` subclasses are discovered automatically. ## Installation diff --git a/build.gradle.kts b/build.gradle.kts index 71079ed..30761c1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -53,7 +53,7 @@ intellijPlatform { pluginConfiguration { name.set("Qiq Templates Support") id.set("io.github.jingu.idea-qiq-plugin") - version.set("0.6.0") + version.set("0.7.0") ideaVersion { sinceBuild.set("241") untilBuild.set("261.*") diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 7736d9e..fbe57ef 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -113,21 +113,21 @@ -
  • Type-aware escape directives +
  • Go to Declaration for Qiq helpers
  • -
  • Cross-template rename refactoring +
  • Fewer false “undefined function/method” warnings
  • -
  • Strict Types setting +
  • Fix: raw-echo helper names