Research VS Code settings export/import #79

Closed
opened 2026-04-01 12:17:03 +00:00 by a24vinla · 6 comments
Collaborator

There should be a way to export/import VS Code settings to allow for coding conventions to be "automatically" followed for each language. This could also be solved with VS Code Extensions for each language, might be simpler.

Related Issue: #51

There should be a way to export/import VS Code settings to allow for coding conventions to be "automatically" followed for each language. This could also be solved with VS Code Extensions for each language, might be simpler. Related Issue: https://git.webug.se/Andras/BoundlessFlowCampus2K/issues/51
Collaborator

One can add specific settings for different languages by going to settings in vscode and searching @lang:{language}, or simply edit general settings. The settings will be written in settings.json that exist here:

  • Windows %APPDATA%\Code\User\settings.json
  • macOS $HOME/Library/Application\ Support/Code/User/settings.json
  • Linux $HOME/.config/Code/User/settings.json

and to share extensions, one can copy the extension folder located here (or making a list somewhere, like the wiki, with extensions to get):

  • Windows %USERPROFILE%.vscode\extensions
  • macOS ~/.vscode/extensions
  • Linux ~/.vscode/extensions
One can add specific settings for different languages by going to settings in vscode and searching @lang:{language}, or simply edit general settings. The settings will be written in settings.json that exist here: - Windows %APPDATA%\Code\User\settings.json - macOS $HOME/Library/Application\ Support/Code/User/settings.json - Linux $HOME/.config/Code/User/settings.json and to share extensions, one can copy the extension folder located here (or making a list somewhere, like the wiki, with extensions to get): - Windows %USERPROFILE%\.vscode\extensions - macOS ~/.vscode/extensions - Linux ~/.vscode/extensions
Collaborator

For less work (what Andras mentioned);

  • "Prettier - Code formatter" (an extension: works with for example: JavaScript, JSON, CSS, HTML. On Pretty.io there exists plugins with sql)
  • "ESlint" (an extension: works with JavaScript)
  • EditConfig (which is like settings but project only, is an extension. Works on all languages (i think) (it is based on file extension). Their webpage with examples: EditorConfig)
  • Artistic (can be retrieved from git, works with: C, C++, C# and Java)
For less work (what Andras mentioned); - "Prettier - Code formatter" (an extension: works with for example: JavaScript, JSON, CSS, HTML. On Pretty.io there exists plugins with sql) - "ESlint" (an extension: works with JavaScript) - EditConfig (which is like settings but project only, is an extension. Works on all languages (i think) (it is based on file extension). Their webpage with examples: [EditorConfig](https://editorconfig.org)) - Artistic (can be retrieved from git, works with: C, C++, C# and Java)
Author
Collaborator

Looks really good, Prettier seems to be the most used. Could you look into a smart way to share Prettier configs?

Looks really good, Prettier seems to be the most used. Could you look into a smart way to share Prettier configs?
Collaborator

There exists file that one can add to a project; https://prettier.io/docs/configuration.html that changes the way it is formatted. From what I have found it works on all levels (not only in root). Editorconfig also works with prettier and could also be used but then it has to be read from root.

Also a useful vs setting I found during research is "format on save" that formats the code when saving the file.

There exists file that one can add to a project; [https://prettier.io/docs/configuration.html](configs) that changes the way it is formatted. From what I have found it works on all levels (not only in root). Editorconfig also works with prettier and could also be used but then it has to be read from root. Also a useful vs setting I found during research is "format on save" that formats the code when saving the file.
Collaborator

Look good. The research covers both VS Code settngs and extensions. I agree that using project-level configuration is better than relying on exporting/importing personal setting. Prettier seems like the best option for sharing formatting rules across the team, and EditorConfig also looks useful as a complement. Maby the only thing missing is a clearer final recommendation for what we actually want to use in the project for exemple, adding a prettier config file yo the repositry.

Look good. The research covers both VS Code settngs and extensions. I agree that using project-level configuration is better than relying on exporting/importing personal setting. Prettier seems like the best option for sharing formatting rules across the team, and EditorConfig also looks useful as a complement. Maby the only thing missing is a clearer final recommendation for what we actually want to use in the project for exemple, adding a prettier config file yo the repositry.
Author
Collaborator

After having talked with the other team leaders we have decided to use Prettier for all languages except C#, which is not inherently supported by prettier, that will use MS-dot.net default. Well done!

After having talked with the other team leaders we have decided to use Prettier for all languages except C#, which is not inherently supported by prettier, that will use MS-dot.net default. Well done!
Sign in to join this conversation.
No milestone
No project
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#79
No description provided.