Scala IDE - Play 2 Eclipse Plug-in not highlighting syntax for Scala HTML Templates

不想你离开。 提交于 2019-11-30 03:57:33

maxmc and valentin_nasta are both right.

We discovered recently that if Eclipse WTP is installed, the bundled html editor is picked over the Play template editor. It is something we will try to improve.

At the moment, you can force Eclipse to use the Play template editor by selecting Open with ... > Template Editor from the context menu, or changing the default for *.html files in Preferences > General > Editors > File Associations.

For the stack trace, it is a known problem. You have to manually mark the project as a Scala project, using Configure > Add Scala Nature from the project context menu.

I assume you don't open the file with the correct editor. Right click your *.scala.html file and select Open with..., select Other, then scroll to the bottom and select Template Editor. Then the syntax highlighting should apply.

To make that change permanent, you can press Ctrl-3 and search for File Associations. There you need to select *.html and move the Template editor to the top of the Associated editors.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!