简体   繁体   English

刀片文件中的php语法突出显示

[英]php syntax highlighting in blade files

I just started using PHPStorm (how did I live without Intellisense?) and it's pretty great. 我刚开始使用PHPStorm(没有Intellisense的情况下如何生活?),它非常棒。 One issue I'm having is with syntax highlighting inside blade files. 我遇到的一个问题是刀片文件中的语法高亮显示。 I start my views off with some php docblocks. 我从一些php docblock开始我的观点。 Not sure where this practice started, but I think this was some carryover from my CodeIgniter days. 不知道这种做法是从哪里开始的,但是我认为这是我CodeIgniter时代的遗留物。 so they start 所以他们开始

<?php
/**
 * explanation of the file
 *
 * @author John Doe
 * @copyright 2015
 */
?>

the problem this causes is it prevents syntax highlighting of php code below. 这引起的问题是它阻止了下面的php代码语法高亮显示。 I believe I've isolated the problem to the @ symbols, probably something to do with the Blade syntax highlighter, because if i remove the @ s it works fine. 我相信我已将问题隔离为@符号,这可能与Blade语法突出显示工具有关,因为如果我删除@ s则可以正常工作。 is there a way in PHPStorm config to fix this? 有没有办法在PHPStorm配置中解决此问题? or do I need a different way to document my views? 还是需要其他方式记录我的观点?

Thanks! 谢谢!

PHPStorm 8 has blade support. PHPStorm 8具有刀片支持。 make sure you update to the latest version to get it. 确保您更新到最新版本以获取它。

https://www.jetbrains.com/phpstorm/features/ https://www.jetbrains.com/phpstorm/features/

From official site: 从官方网站:

Twig, Blade & Smarty Templates 树枝,刀片和聪明的模板

Use the Twig, Blade or Smarty template engine to take advantage of productivity features when working with template files: configurable syntax highlighting for different constructs; 在处理模板文件时,使用Twig,Blade或Smarty模板引擎来利用生产力功能:针对不同结构的可配置语法高亮; syntax errors highlighting; 语法错误突出显示; functions and attributes completion; 功能和属性完成; automatic insertion of paired braces, quotes and closing tags; 自动插入成对的花括号,引号和结束标记; and more. 和更多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM