gpt4 book ai didi

javascript - 如何在 .babelrc 文件上设置和保留语言语法类型

转载 作者:行者123 更新时间:2023-11-29 10:31:24 26 4
gpt4 key购买 nike

在 Atom 1.18 中,每次我打开编辑器时,我的 .babelrc 文件默认为 JSON 文件类型,这使得语法突出显示看起来很不对。而且我必须不断将它改回 Babel 类型。

enter image description here

如何修复(暂时):

enter image description here

enter image description here

每次关闭和打开 .babelrc 文件时都必须重置它。

现在我意识到这是一个很少被触及的文件,但了解如何针对其他文件类型修复此问题会很有帮助。

最佳答案

有一种非常具体的方法可以在 config.cson 中进行设置

https://discuss.atom.io/t/how-do-i-make-atom-recognize-a-file-with-extension-x-as-language-y/26539

http://flight-manual.atom.io/using-atom/sections/basic-customization/#configuring-with-cson

"*":
core:
customFileTypes:
"source.js.jsx": [
"js"
"es6"
"es"
"babel"
"babelrc"
"jsx"
]

关于javascript - 如何在 .babelrc 文件上设置和保留语言语法类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45283601/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com