Standardizing VS Code vs. Visual Studio - JessicaOPRD/docs GitHub Wiki

I can tell this is going to be a lot like using both SSMS and Azure Data Studio.

Look and Feel

Themes

It's helpful to find a popular community theme to use between apps, if theme support is available. Dracula supports a pleasant dark theme that standardizes highlighting between many apps, but it's far from the only option.

Other Adjustments

Task Visual Studio Code Visual Studio
Font Consolas Change to Consolas

Code Formatting

Editorconfig

Editorconfig is a popular standardized code formatting config file intended to be used universally between coding environments. Though many IDEs require a plug-in (including VS Code), many others have added native support.

Visual Studio Options

Support for Editorconfig ships with Visual Studio. Kind of oddly the GUI takes over the .editorconfig file when you create and open the file via Visual Studio. I could not find a way to view the raw code, but the same config can be viewed raw in VS Code.

Format on save support was only recently added without a plugin to 2022: Bringing Code Cleanup on Save to Visual Studio. However Code Cleanup does not run from Editorconfig, and a plan to resolve this has existed since 2019. Will likely need to use a plug-in to achieve this effect? Checking "Run Code Cleanup profile on Save" appears to work in 17.6.4 (2022).

About Code Cleanup: This applies to the whole codebase using the current config.

Option Runs by On save support? Config file support? Designed for multiple IDEs? C# whitespace? HTML whitespace?
Code Cleanup ⚪ Run Code Cleanup ⚪ Does this run on Editorconfig if one exists? Is it invoked via the "Format document" fixer? ✔️ Yes (2022) — set under Tools > Options > Text Editor > Code Cleanup ❌ May be able to export through IDE settings files on local machine (guessing), but not ideal, and requires GUI setup ❌ No 🟡 .cs files only ❌ Ignores .razor @code block ❌ Ignores .razor and .cshtml HTML formatting
Editorconfig ⚪ New code generation ⚪ Run Code Cleanup ⚪ Integrates with error level config ✔️ Seems to work in latest 2022 version using "Run Code Cleanup profile on Save" config option 🟡 Only with plug-in on older versions, but verified/maintained by Editorconfig community ✔️ ✔️ 🟡 .cs files only ❌ Ignores .razor @code block ❌ Ignores .razor and .cshtml HTML formatting

VS Code Options

Option Runs by On save support? Config file support? Designed for multiple IDEs? C# whitespace? HTML whitespace?
Editorconfig ctrl + p "Format Document" 🟡 With not entirely clear configuration, but it is natively supported ✔️ ✔️ ✔️ 🟡 .cs files only ❌ Ignores .razor @code block
{
  "prettier.requireConfig": true,
  "prettier.useEditorConfig": false
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
  "[vue]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  },
}
⚠️ **GitHub.com Fallback** ⚠️