Export IDEA style settings for VSCode

已回答

Is it possible to export code style settings for VSCode? Or does VSCode understand how to import IDEA (based) IDE settings?
Thank you.

0

IntelliJ IDEA and VSCode formatters are different and not all the settings can be shared. The one common thing is that both support editorconfig formatting. In IntelliJ IDEA you can export some of the supported options into the .editorconfig format that can be later used in VSCode:

https://youtrack.jetbrains.com/issue/WEB-15687#focus=streamItem-27-2778370.0-0.

1

@SergeBaranov, as I understand it is still very limited. It doesn't seem to allow to specify, what for example is styling for curly brackets and so on. Are there spaces around arguments inside curly brackets. A huge bunch of limitations I would say.

0

You could ask VSCode developers to add import for IDEA code style settings.

0

So basically what you are saying, that there is no way at the moment, to create same code style environment between two IDEAs by exporting settings from IDEA into VSCode or vice versa.

0

Yes, currently it's possible only through editorconfig.

0

is there any 2022 updates on this? would it be possible in intellij to export .editorconfig for vscode?

0

Gparmigiani

Yes, it is possible:

File | Settings | Editor | Code Style

1

File | Settings | Editor | Code Style

1. IntelliJ IDEA 的设置中先导出为 Eclipse XML 配置文件

2. Visual Studio Code 中安装插件 Language Support for Java(TM) by Red Hat

3. Visual Studio Code 中 mac 按Cmd + , windows按 Ctrl + , 进入设置界面,查找java.format.settings.url 输入步骤1导出的文件路径

0

install plugin: Code Style  in Visual Studio Code, then import IDEA style settings

https://marketplace.visualstudio.com/items?itemName=systemcn.code-style

0

请先登录再写评论。