DEV Community

Soham Dasgupta
Soham Dasgupta

Posted on

Optimized VS Code Settings for an Enhanced Developer Experience

Visual Studio Code (VS Code) is a powerful code editor that many developers love. However, the default settings may not provide the best experience out of the box. To help you get the most out of VS Code, I've compiled a set of optimized settings that, I believe, should be considered default. These configurations can enhance your productivity and streamline your development workflow significantly.

Essential Settings to Consider as Default

Here's the optimized configuration that can elevate your VS Code experience:

{
  /* Breadcrumbs */
  "breadcrumbs.enabled": false,

  /* Diff Editor */
  "diffEditor.ignoreTrimWhitespace": false,

  /* Editor Settings */
  "editor.accessibilitySupport": "off",
  "editor.bracketPairColorization.enabled": true,
  "editor.codeActionsOnSave": {
    "source.organizeImports": "always"
  },
  "editor.cursorSmoothCaretAnimation": "on",
  "editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace",
  "editor.fontLigatures": "'calt', 'liga', 'ss02', 'ss07', 'ss08', 'ss09', 'ss13', 'ss14', 'zero'",
  "editor.fontSize": 16,
  "editor.formatOnSave": true,
  "editor.gotoLocation.multipleDeclarations": "goto",
  "editor.gotoLocation.multipleImplementations": "goto",
  "editor.gotoLocation.multipleDefinitions": "goto",
  "editor.gotoLocation.multipleReferences": "goto",
  "editor.gotoLocation.multipleTypeDefinitions": "goto",
  "editor.guides.bracketPairs": "active",
  "editor.linkedEditing": true,
  "editor.minimap.enabled": false,
  "editor.suggestSelection": "first",
  "editor.tabSize": 2,
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
        "scope": [
          "comment",
          "constant.language",
          "keyword.control",
          "keyword.operator.expression",
          "keyword.other",
          "keyword.operator.new",
          "variable.language",
          "entity.other.attribute-name",
          "storage"
        ],
        "settings": {
          "fontStyle": "italic"
        }
      },
      {
        "scope": ["storage.type.function.arrow"],
        "settings": {
          "fontStyle": ""
        }
      }
    ]
  },
  "editor.wordWrap": "off",

  /* Emmet */
  "emmet.triggerExpansionOnTab": true,

  /* Explorer */
  "explorer.compactFolders": false,
  "explorer.openEditors.visible": 0,
  "explorer.sortOrder": "type",

  /* Extensions */
  "extensions.ignoreRecommendations": true,

  /* Files */
  "files.hotExit": "off",
  "files.trimFinalNewlines": true,
  "files.trimTrailingWhitespace": true,

  /* Git */
  "git.autofetch": false,
  "git.confirmSync": false,
  "git.enableSmartCommit": true,
  "git.openRepositoryInParentFolders": "always",
  "git.postCommitCommand": "push",

  /* Search */
  "search.showLineNumbers": true,

  /* Security */
  "security.workspace.trust.enabled": false,

  /* Terminal */
  "terminal.integrated.fontSize": 14,
  "terminal.integrated.persistentSessionReviveProcess": "never",
  "terminal.integrated.profiles.windows": {
    "PowerShell": {
      "icon": "terminal-powershell",
      "source": "PowerShell",
      "args": ["-NoLogo"]
    }
  },
  "terminal.integrated.defaultProfile.windows": "PowerShell",
  "terminal.integrated.defaultProfile.osx": "zsh",

  /* Update */
  "update.mode": "default",

  /* Window Settings */
  "window.restoreWindows": "none",
  "window.zoomLevel": 0.7,

  /* Workbench */
  "workbench.editor.enablePreview": false,
  "workbench.editor.highlightModifiedTabs": true,
  "workbench.editor.restoreViewState": false,
  "workbench.list.openMode": "doubleClick",
  "workbench.layoutControl.enabled": false,
  "workbench.localHistory.enabled": false,
  "workbench.sideBar.location": "right",
  "workbench.startupEditor": "none",
  "workbench.tips.enabled": false,
  "workbench.tree.indent": 20
}
Enter fullscreen mode Exit fullscreen mode

Font and Color Theme Recommendations

In addition to these settings, I highly recommend using a Nerd Font that supports ligatures. Ligatures can make your code more readable and visually appealing. Some popular Nerd Fonts include Fira Code, JetBrains Mono, and Hack.

Also, choose a color theme that you find comfortable and visually pleasing. Whether it's a dark theme for reduced eye strain or a light theme for a fresh look, the right theme can significantly enhance your coding experience.

Conclusion

By adopting these optimized settings as your default configuration in VS Code, you can create a more productive and enjoyable development environment. Coupled with a good font and a pleasing color theme, these adjustments can help you focus better and code more efficiently. Happy coding!

Top comments (0)