IntelliJ 中速度模板文件的代码样式

问题描述

问题

.vm 文件中的自动缩进不符合我的要求。下面我添加自动格式化的文件以及我想要的格式。

以下代码片段由 IntelliJ 自动格式化:

#styleTitle('sample-title')

#@styleDescription()
A short description of the component
#end


#@styleComponent('/components/molecules/sampleComponent/sampleComponent',{
    "headline": 'A headline title',"alertText": "Alert text example","link" : {
    "href": "www.stackoverflow.com","text": "Click here!"
}
})#end

我想要的:

#styleTitle('sample-title')

#@styleDescription()
    A short description of the component
#end


#@styleComponent('/components/molecules/sampleComponent/sampleComponent',"link" : {
        "href": "www.stackoverflow.com","text": "Click here!"
    }
})#end

问题

我在 IntelliJ IDEA | Preferences | Editor | Code Style | VeLocity 下找不到任何其他配置来调整不同代码块的缩进。

如何在 IntelliJ 中为特定文件类型手动配置代码样式,这样的配置文件是什么样的?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)