atom如何将.js文件的默认语法高亮显示更改为language-babel [英] atom how to change default syntax highlighting for .js files to language-babel
本文介绍了atom如何将.js文件的默认语法高亮显示更改为language-babel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这一切都在标题中..突然原子不再默认为 language-babel
for .js文件,我不知道如何回到以前的行为。
It's all in the title.. suddenly atom no longer defaults to language-babel
for .js files and I'm not sure how to get back to the previous behaviour.
更新 - 当前config.cson:
update - current config.cson:
"*":
core:
telemetryConsent: "no"
editor:
fontFamily: "Operator Mono Lig"
"exception-reporting":
userId: "a8f4cc72-fe9c-4093-b562-fcb344219d50"
"language-dotenv":
dotenvFileNames: [
".env"
".env.schema"
]
"linter-eslint": {}
"linter-ui-default": {}
"prettier-atom":
formatOnSaveOptions:
enabled: true
isDisabledIfNotInPackageJson: true
prettierOptions:
bracketSpacing: false
semi: false
useEslint: true
"tree-view":
hideVcsIgnoredFiles: true
welcome:
showOnStartup: false
".languagebabel.ttlextension":
editor:
softWrap: true
我尝试了一些你的建议的变化,显然我搞砸了因为原子不能更长的启动
I tried a few variations of your suggestion and clearly I messed it up because atom could no longer launch
推荐答案
您可以通过在config.cson文件中添加以下内容来创建自定义文件类型
You can create a custom file type by adding following in your config.cson file
core:
customFileTypes:
"source.js.jsx": [
"jsx"
"js"
]
这将为所有.js和.jsx使用language-babel文件
This will use language-babel for all the .js and .jsx files
这篇关于atom如何将.js文件的默认语法高亮显示更改为language-babel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文