Visual Studio Code

How To Change VSCode Theme By Time of Day?

Val Paliy

Eye comfort is very important, especially to programmers, who spend most of their day looking at code in their favorite editor. This programming productivity tip can significantly improve your coding experience and reduce eye strain during long development sessions.

I’ve already mentioned a few themes I like, and today I am going to teach you how to set your editor up in such away that the theme changes automatically depending on what time of day it is. This developer tools automation can greatly enhance your coding comfort throughout different lighting conditions.

My IDE Settings.

Val Paliy

My settings for Visual Studio Code. Please feel free to use any and all settings you might find useful :)

{
  "cSpell.language": "en,uk",
  "editor.codeActionsOnSave": {
    "source.organizeImports": "explicit"
  },
  "editor.colorDecorators": true,
  "editor.cursorBlinking": "solid",
  "editor.cursorStyle": "line",
  "editor.cursorWidth": 5,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.fontFamily": "JetBrains Mono",
  "editor.fontLigatures": true,
  "editor.fontSize": 17,
  "editor.fontWeight": 600,
  "editor.formatOnSave": true,
  "editor.formatOnType": true,
  "editor.letterSpacing": 0.5,
  "editor.lineHeight": 25,
  "editor.linkedEditing": true,
  "editor.minimap.enabled": false,
  "editor.renderWhitespace": "none",
  "editor.semanticHighlighting.enabled": true,
  "editor.suggestSelection": "first",
  "editor.wordWrap": "on",
  "editor.wordWrapColumn": 111,
  "emmet.includeLanguages": {
    "gohtml": "html",
    "html": "html"
  },
  "emmet.triggerExpansionOnTab": true,
  "explorer.confirmDelete": false,
  "files.insertFinalNewline": true,
  "files.trimTrailingWhitespace": true,
  "git.allowForcePush": true,
  "git.allowNoVerifyCommit": true,
  "git.autofetch": false,
  "git.confirmForcePush": false,
  "git.confirmNoVerifyCommit": false,
  "git.confirmSync": false,
  "git.enableSmartCommit": true,
  "go.lintOnSave": "package",
  "go.useLanguageServer": true,
  "security.workspace.trust.enabled": true,
  "security.workspace.trust.startupPrompt": "never",
  "window.menuBarVisibility": "compact",
  "workbench.colorTheme": "Catppuccin Mocha",
  "workbench.iconTheme": "catppuccin-mocha",
  "workbench.startupEditor": "none",
  "[go]": {
    "editor.defaultFormatter": "golang.go"
  },
  "[markdown]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.wordWrap": "on"
  }
}