|
Project
|
PhpStorm/WebStorm
|
|
Priority
|
Normal |
|
Type
|
Feature |
|
State
|
Won't fix |
|
Assignee
|
Alexey Gopachenko |
|
Subsystem
|
No subsystem |
|
Fix versions
|
No Fix versions |
|
Affected versions
|
No Affected versions |
The file is 020_jobs.yml
JobeetJob: # Starts at the beginning of the line (no whitespace before) <?php for ($i = 100; $i <= 130; $i++): ?> job_<?php echo $i ?>: category_id: programming company: Company <?php echo $i."\n" ?> position: Web Developer location: Paris, France description: Lorem ipsum dolor sit amet, consectetur adipisicing elit. how_to_apply: | Send your resume to lorem.ipsum [at] company_<?php echo $i ?>.sit is_public: true is_activated: true token: job_<?php echo $i."\n" ?> email: job@example.com <?php endfor; ?>The good news is that such cases are already supported in current version:
Just open settings and reassign yml extension to PHP file type and than select desired template language under "Template Data Languages"
Why not just try it?..
Everything inside the <?php ?> tags was correctly recognized as PHP, but there was no syntax coloring for the YAML code outside the <?php ?> tags, the Structure window was empty, etc.
Syntax highlighting was OK for me. But Structure panel is not showing Yaml structure, only PHP variables in PHP tab.
Does that have to be configured for every .yml file in the project, or can I blanket-apply the Template Data Language setting to every applicable file?
Template Data Language can be applied to a specific file or folder (so ALL files in that folder will inherit the new value). You cannot mass-apply it using filename mask (e.g. *.yml).
It also would necessitate storing the .idea metadata folder in the source control repository, or else each developer on the team would have to duplicate this configuration workaround in her own environment for each project.