- Download Docbook 5.0 (make sure it has xsd directory / files)
- https://docbook.org/xml/5.0.1/docbook-5.0.1.zip
- Place contents in project directory
- Settings > Languages > Schemas & DTDs
- Configure custom schema
- URL: http://docbook.org/ns/docbook
- File: xsd/docbook.xsd you just downloaded
- Configure custom schema
- Place cursor over CDATA block inside a
<programlisting>and Alt-Enter - You should see option for language injection
- Select PHP
- Now all CDATA blocks inside
<programlisting>will be considered PHP by default! - To configure further (or disable), place cursor anywhere inside the CDATA and press Alt+Enter and select "language injection settings"