简体   繁体   English

在 Atom 编辑器中突出显示 HTML 中的 javascript

[英]Highlight javascript inside HTML in Atom editor

So, I'm new in Atom, and I noticed that when I use <script> in HTML, it won't highlight anything, I'd like to know if this is normal, and if it is, how to make Atom highlight JavaScript inside <script> tag within HTML?所以,我是 Atom 的新手,我注意到当我在 HTML 中使用<script>时,它不会突出显示任何内容,我想知道这是否正常,如果是,如何使 Atom 突出显示HTML 中<script>标签内的 JavaScript?

在此处输入图片说明

Go to the settings core tab and uncheck Use Tree Sitter Parsers option. 转到设置核心选项卡,然后取消选中“ Use Tree Sitter Parsers选项。 Should work without restarting atom. 应该在不重新启动原子的情况下工作。

I had the same issues. 我有同样的问题。 The solution is to install a new theme. 解决方案是安装新主题。 Minimal-syntax-dark 最小语法暗

这是由linter插件'linter-jshint'引起的,其中选中了检查<script>标签中的javascript的选项,并禁用了高亮显示

this is a problem I (and others) had before, but it disappeared after an update. 这是我(和其他人)以前遇到的一个问题,但在更新后消失了。 Try adding type="text/javascript" ? 尝试添加type="text/javascript"吗?

the syntax highlighter for HTML in atom a package called 'language-html'. HTML的语法高亮显示在名为“ language-html”的程序包中。 Try to reinstall it maybe? 尝试重新安装它吗? (file > edit > preferences > Packages) (文件>编辑>首选项>包)

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

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